G
Guest
Below is my function and SQL command. The function works great except that I'm trying to generate about 300 random passwords via an update query. This function and SQL command give every record the same password. If someone could please tell me how to tweak this so that I can generate 300 different passwords I would greatly appreaciate it
Thanks
Joh
Function
Function RandomPassword(
Dim intRandom As Intege
Dim strPassword As Strin
Randomize Time
Do Until Len(strPassword) =
intRandom = Int(Rnd(1) * 75) + 4
Select Case intRando
Case 48 To 57, 65 To 90, 97 To 12
strPassword = strPassword & Chr$(intRandom
End Selec
Loo
RandomPassword = strPasswor
End Functio
SQL
UPDATE web SET web.[Password] = RandomPassword();
Thanks
Joh
Function
Function RandomPassword(
Dim intRandom As Intege
Dim strPassword As Strin
Randomize Time
Do Until Len(strPassword) =
intRandom = Int(Rnd(1) * 75) + 4
Select Case intRando
Case 48 To 57, 65 To 90, 97 To 12
strPassword = strPassword & Chr$(intRandom
End Selec
Loo
RandomPassword = strPasswor
End Functio
SQL
UPDATE web SET web.[Password] = RandomPassword();