Generate a Random String, Random Password in MS Access

Building on an old post MS Access VBA – Generate a Random String, I wanted to post a fully functional sample in which I added full support for multiple string generation.  I use this tool to generate a set of random passwords and then pick one to create a new account password…

The beauty of this tool over many others, is that you run it locally, not on someone else’s server (god knows if your actions are being logged with malicious intent) like all the online generators do (yes, call me paranoid – in today’s world one cannot be too safe).  This way, you remain in control.

The other advantage is that the passwords are saved to a Table so you can continue to work with them easily. One word of caution however is that the table gets wiped clear every time you run the generator so be sure to output any result you wish to keep long term to another table or source (Excel, Word, …).

Random String Generator

Notice, that with this demo, you can control what type of string is generated:

  • Number of random strings to generate
  • String length
  • Apha
    • Lower case
    • Upper case
  • Numeric
  • Special Characters (that you can specify/edit)

Disclaimer/Notes:

If you do not have Microsoft Access, simply download and install the freely available runtime version (this permits running MS Access databases, but not modifying their design):

Microsoft Access 2010 Runtime
Microsoft Access 2013 Runtime
Microsoft Access 2016 Runtime
Microsoft 365 Access Runtime

All code samples, download samples, links, ... on this site are provided 'AS IS'.

In no event will Devhut.net or CARDA Consultants Inc. be liable to the client/end-user or any third party for any damages, including any lost profits, lost savings or other incidental, consequential or special damages arising out of the operation of or inability to operate the software which CARDA Consultants Inc. has provided, even if CARDA Consultants Inc. has been advised of the possibility of such damages.

Download

Feel free to download a copy by using the link provided below:

Download “MS Access Random String & Password Generator (x32 accdb)” RndStr.zip – Downloaded 9598 times – 40.02 KB  
 

Demo Database Version History

Version Date Changes
V1.000 2014-08-15 Initial Release
V1.001 2019-09-03 Add ability to specify Special Characters to use directly on the form.
V1.002 2025-11-28 Add ability to add minimum character requirements
Fixed bug if password included a single quote (‘).

7 responses on “Generate a Random String, Random Password in MS Access

  1. mark

    A very nice tool. One thing I see is that my company requires 1 or each – Cap, lowercase, Special Character, and a number. The tools does not always give me at least 1 of each. Is there a way to change that to have a 4 types?

    Thank you