Unique number

  • Thread starter Thread starter LG
  • Start date Start date
L

LG

I have a field in a form named batchID. When the processor logs in I would
like that field BatchID to automatically populate there user id and a number
or date . Something that can never duplicate it self.
ex. Open the form in the batch field it reads UX0152-1. They close the form
that batch will stay that number. They reopen the form and the batch field
now reads UX0152-2.
Any suggestions?
Thank you in advance.
 
hi,
I have a field in a form named batchID. When the processor logs in I would
like that field BatchID to automatically populate there user id and a number
or date .
Any suggestions?
Don't mix two information pieces into one field. It's against the rules
of normalization (1NF), see

http://en.wikipedia.org/wiki/Database_normalization

Instead of one field use either

a) two fields, UserID and TimeStamp and display the composite, e.g. a
TextBox with =[UserID] & "-" & [TimeStamp]. Create a combined unique
index over these both fields.

b) basically the same as above, but create a new table Batch with the
fields ID, UserID and TimeStamp. ID is an auto number and the primary
key used as a foreign key reference in your other table. A unique index
over UserID and TimeStamp is also required.


mfG
--> stefan <--
 
Back
Top