How to join fields together on Access?

P

Pierre

I have this category code, type code, design code and color code, now, in the
main product table i want to make the key the transposition of those 4 fields
let say my category code is PH, my type code is 01, my design code is 02 and
my color code is 03, i want the key to automatically give PH010203.
Is that possible on Access 2003?
thank you very much
 
J

John W. Vinson

I have this category code, type code, design code and color code, now, in the
main product table i want to make the key the transposition of those 4 fields
let say my category code is PH, my type code is 01, my design code is 02 and
my color code is 03, i want the key to automatically give PH010203.
Is that possible on Access 2003?
thank you very much

You can open the table in design view and Ctrl-click all four fields; then
click the Key icon.

It is neither necessary nor appropriate to create a new field concatenating
the components. That would be redundant, a waste of space, and risk data
integrity!

To *DISPLAY* the concatenated field, just calculate it on the fly in a Query
or in the Control Source of a textbox:

[Category Code] & [Type Code] & [Design Code] & [Color Code]

assuming that all the fields are of Text type (as they should be).

John W. Vinson [MVP]
 
Top