[AccessD] Random Password generator

stuart at lexacorp.com.pg stuart at lexacorp.com.pg
Mon May 19 19:42:09 CDT 2003


On 19 May 2003 at 12:57, Joe Rojas wrote:

> Hi All,
> 
> Does anyone have a routine that will generate a random alphanumeric string?
> I would also like to be able to specify a length.
> 
> If not, does anyone have an idea of how to achieve such a thing?
> 
> Thanks,
> Joe R.
> 

Function password(pwlength As Long) As String
Dim loopcount As Long
Dim strPW As String
Dim strCharacters As String
strCharacters = "1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"
Randomize Timer
For loopcount = 1 To pwlength
    strPW = strPW & Mid$(strCharacters, Int(Rnd() * 52) + 1, 1)
Next
password = strPW
End Function
-- 
Lexacorp Ltd
Information Technology Consultancy, Application Development






More information about the AccessD mailing list