combining fields

  • Thread starter Thread starter CrossofG
  • Start date Start date
C

CrossofG

I have an automatic number field and a last name field. I
want to create a third field combination of the number
field and the first four letters of the last name. It
would be used as an identification field. I do it now
manually.
 
If you're doing your data entry from a form, then write an
AfterUpdate event to create your third field.

sub LastName_AfterUpdate()

Me.CombinedField = AutonumberField & left(LastName,4)

end sub

Since the autonumber field is a unique number, you might
want to think why you need to combine them. Indexing the
last name and autonumber fields would probably be
preferable.

Mark
 
I have an automatic number field and a last name field. I
want to create a third field combination of the number
field and the first four letters of the last name. It
would be used as an identification field. I do it now
manually.

This is a rather bad idea, especially if you'll be storing this
redundant field in your table! The autonumber is ALREADY unique;
adding four letters to it doesn't make it any more unique.

Could you explain why you feel that you need this field?
 
Back
Top