Andrew said:
Can anyone tell me what to set the default as in an access database in order
to store a random password, preferably made up of text and numbers?
Many thanks
Andrew Turner
tblIntegers
ID AutoNumber
theInt Long
ID theInt
1 1
2 2
3 3
qryRandomPasswords:
SELECT ID, Rnd(ID)*10^9 AS Seed,
"abcedefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789?@!#$%^&*()_"
AS Characters, Seed Mod 74+1 AS Pos1, Mid([Characters],[Pos1],1) AS
Result, [Result] & [Result] & [Result] & [Result] & [Result] & [Result]
& [Result] & [Result] & [Result] & [Result] AS RandomPassword FROM
tblIntegers;
!qryRandomPasswords:
ID Seed Characters Pos1 Result RandomPassword
1 179401874.542236 abc... 24 G MKKSnHgCoo
2 52891194.8204041 abc... 18 D GX4BLo3dLj
3 684617638.587952 abc... 32 e ueBq&*yPtC
That uses 10 characters, but it's easy to change it to 14 characters.
Since clicking on a record in the query can change values or display
strangely, it may be better to run a Make Table query similar to what I
did here if you want to generate a list of random passwords:
http://groups.google.com/group/comp.databases.ms-access/msg/74ee550e77af8209
To get this to fill in on a form control's control source, use a table
with one record instead of three and call a public function where the
SQL string above is evaluated. Put an equal sign before the function
call in the control source.
James A. Fortune
(e-mail address removed)