setting primary key by using concatenetion

  • Thread starter Thread starter Dummy
  • Start date Start date
D

Dummy

I would like my primary key to be a combination of the values of 2 fields,
Can I use the concatenation expression?
 
hi,
I would like my primary key to be a combination of the values of 2 fields,
Can I use the concatenation expression?
Open your table in design view. Mark the two fields. Set the primary key
using the tool bar.


mfG
--> stefan <--
 
Just in case it isn't apparent from Stefan's answer, you're not actually
concatenating the values of the two fields into a single field. You're
creating a Primary Key that consists of the two fields. Note that this will
not work if either of the fields can be Null.

If you need the concatenated value to be shown on forms or reports, create a
query that has a calculated field that concatenates the value, and use the
query wherever you would otherwise have used the table.
 
Back
Top