Combining these fields...2nd try Sorry

J

JustMe

My last question didn't make it through the translation. MayI try again?

Structure of table below:

CustID (?? What to set this to ??)
Last4SSAN T
LName T
FName T
MI T


I want to combine [Last4SSAN] + [LName] to create CustID.
What do I set the CustID field to and how do I combine these
two fields and save it to the table?
I have set last4ssan and LName to Primary Key field.

I recieved a response from my orig post but I lost
something in translation.(Sorry Steve) If I set these two fields (seperatly)
to index no dups then it will not allow me to enter another person with the
same last name. (ie; smith)

Last recieved response:In table design view, hold down shift key then click
on
the fileds to highlight, now click on PK icon. Set the
index to unique with no duplicates.
This is known as a composite key.
Two days ago I had a similar post.
SteveAlb

Thanks for your help
 
W

Wayne Morgan

When you set the 2 fields to be the primary key, an index is created using
both fields that won't let a combination of the 2 fields be a duplicate.
Don't set a No Duplicates index separately on each field.

For the CustID, you shouldn't need to store it. You could simply concatenate
the 2 fields whenever you want to use that information. For example, to show
the CustID in a textbox you would set the Control Source to

=[LName] & [Last4SSAN]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top