UniqueID Function
One-Liner to generate a unique Id. Does NOT require a database. No autonumber fields needed.
Original Author: John W. Lowther, Jr.
Assumptions
Assumes the system clock is never reset to a previous time. Could generate duplicate's if the system clock is reset to a prevoius time, but not likely due to the precision of the function.
Returns
UniqueID based on the System Clock
Code
Public Function GetUniqueId() As String
GetUniqueId = Trim(Str(CDbl(Now) * 10000000000#))
End Function
Comments
No comments have been added for this post.
You must be logged in to make a comment.