A
Amy Blankenship
I've created a Password function that creates a random password
Function Password(passlength) As String
Dim i As Integer, tmp As String, tmpChar As String, arrChars(61) As
String, j As Integer
For i = 0 To 9
arrChars(j) = i
j = j + 1
Next
For i = 65 To 90
arrChars(j) = Chr(i)
j = j + 1
Next
For i = 97 To 122
arrChars(j) = Chr(i)
j = j + 1
Next
For i = 1 To passlength
Randomize
tmpChar = arrChars(Int(UBound(arrChars) - LBound(arrChars) + 1) *
Rnd + LBound(arrChars))
tmp = tmp & tmpChar
Next
Password = tmp
End Function
When I run a query to reset all the passwords, all passwords get set to the
same password. How can I force the query to call the function uniquely for
each user?
Thanks;
Amy
Function Password(passlength) As String
Dim i As Integer, tmp As String, tmpChar As String, arrChars(61) As
String, j As Integer
For i = 0 To 9
arrChars(j) = i
j = j + 1
Next
For i = 65 To 90
arrChars(j) = Chr(i)
j = j + 1
Next
For i = 97 To 122
arrChars(j) = Chr(i)
j = j + 1
Next
For i = 1 To passlength
Randomize
tmpChar = arrChars(Int(UBound(arrChars) - LBound(arrChars) + 1) *
Rnd + LBound(arrChars))
tmp = tmp & tmpChar
Next
Password = tmp
End Function
When I run a query to reset all the passwords, all passwords get set to the
same password. How can I force the query to call the function uniquely for
each user?
Thanks;
Amy