N
nxqviet
Hi all,
I need to generate a random string to number and text on a form every
time someone open it. this string will be used as session number, which
then will be used as a criteria for other calculations using sql and
queries.
should I use a compination of Date, time, and username to generate this
random string? if yes, how do i best acheiving this? if not, what is a
better way to get this random number?
Here is what I would do, but I need to reformat the date and time so
that they appear in integer format rather than 1/2/2007 3:32 PM .....
---------------------------------
Dim varDate As Variant
Dim varTime As Variant
Dim varName As Variant
varDate = Date
varTime = Time
varName = Environ("UserName")
SessionID.Value = varDate & varTime & varName
---------------------------------
Thanks
V_
I need to generate a random string to number and text on a form every
time someone open it. this string will be used as session number, which
then will be used as a criteria for other calculations using sql and
queries.
should I use a compination of Date, time, and username to generate this
random string? if yes, how do i best acheiving this? if not, what is a
better way to get this random number?
Here is what I would do, but I need to reformat the date and time so
that they appear in integer format rather than 1/2/2007 3:32 PM .....
---------------------------------
Dim varDate As Variant
Dim varTime As Variant
Dim varName As Variant
varDate = Date
varTime = Time
varName = Environ("UserName")
SessionID.Value = varDate & varTime & varName
---------------------------------
Thanks
V_