Creating a unique ID number based on date and time

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



I have a question that I think might be fairly simple to answer.

I have the following line of code to create a fairly unique ID number for a
spreadsheet that tracks follow up issues. It is as follows:

FollowUpInitial.EventID.Value = CMTAudit.AcctNumberTxt.Value & "-" _
& CMTAudit.EventCode.Value & "-" & _
Format(CMTAudit.AuditDateTxt.Value, vbLongTime)

The "AccountNumberTxt.Value" is unique to each patient visit but not to time
or date.
The "EventCode.Value" identifies the type of issue that we are tracking.
The "AuditDateTxt.Value" puts in the current date the issue was found.

The ID Number then looks like this: 123456-NPSG1a-38440

However, I can have multiple occurances of the same issue on the same
account and the same date and this creates duplicates in the ID number. Can
I insert as a number (sort of like the date, i.e. 5 digits) the value for the
current time to the second? I have tried simply this:

FollowUpInitial.EventID.Value = CMTAudit.AcctNumberTxt.Value & "-" _
& CMTAudit.EventCode.Value & "-" & Time

But I keep getting: 123456-NPSG1a-09:54:06

While this could work for my identifier, I would prefer just a 5 or 6 digit
number.

Is this possible?


.



Relevant Pages

  • Re: SQL insert/update duplicate entries
    ... parse I create a tab delimited dataset made up of a 7 digit ... identifier, followed by, followed by a 10-character sequence. ... duplicates and they simply get inserted with a unique id. ...
    (comp.lang.perl.misc)
  • Re: Groups of order 32
    ... As each group of order 32 is found, find all of its subgroups of order ... 16 and their actions on each other, so you can weed out duplicates. ... Jim Heckman ... Prev by Date: ...
    (sci.math)
  • RE: Combo Box Look up
    ... Time ID field also has duplicates. ... identifier for the records that are being displayed in your combo box and use ... you simply display the value by using the ... information display in the form...etc. ...
    (microsoft.public.access.tablesdbdesign)
  • Re: Why C dont allow the name of a variable start with a digit?
    ... It's been explained there could be ambiguity between integer constants and ... It might have been feasible where there was no ambiguity (so 0XABC must be a ... constant, but 0XABG must an identifier), but it's unsatisfactory. ... would offset some advantage of starting with a digit. ...
    (comp.lang.c)
  • Re: Random NUmber Generator creates duplicates
    ... pseudo-random number which *could* possibly have duplicates. ... digit having one value out of a possible 36 characters * 15 digits should ... on exponential growth of variability. ...
    (microsoft.public.scripting.vbscript)