Creating a field based on 2 characters from Field 1 and an auto nu

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am trying to create a field based on the first two letters of one field and
then having 5 random numbers (example: db35751)

Can this be done? If so, please assist. Please note, I am very new and I
am not a whiz at VB.
 
I am trying to create a field based on the first two letters of one field and
then having 5 random numbers (example: db35751)

Can this be done? If so, please assist. Please note, I am very new and I
am not a whiz at VB.

You certainly cannot do it using an Autonumber: a random autonumber is
in the range -2^31 to +2^31-1, some two billion either way.

This kind of "composite" key is generally considered A Bad Idea.
Storing information redundantly (the first two letters) is a problem;
storing two disparate chunks of information in the same field is an
even worse idea; constructing an artificial primary key is rarely
beneficial either, since you must test for duplicates anyway. Could
you explain why you feel that this field is necessary?

John W. Vinson[MVP]
 
Back
Top