Replace values with a foreign key.

  • Thread starter Thread starter Gluefoot
  • Start date Start date
G

Gluefoot

Hi everyone, fairly new to Access. I have a table "TRACKING" with a column
that has USER_NAMES. There are about 3000 records in this table. I'd like to
replace the names in this user name column with a USER_ID that is a primary
key on a new USER table, is there a quick way to do this in Access?

Thanks in advance for help.
 
Hi everyone, fairly new to Access. I have a table "TRACKING" with a column
that has USER_NAMES. There are about 3000 records in this table. I'd like to
replace the names in this user name column with a USER_ID that is a primary
key on a new USER table, is there a quick way to do this in Access?

Thanks in advance for help.

Not real quick but it certainly can be done. Are the names unique or repeated?
How are they stored - "John V. Doe" in the USER_NAMES field (not ideal) or
fields such as FirstName, LastName, MiddleName? do you already have a new USER
table or are you trying to create one?

In essence, what you'll need is to create a new USER table with a UserID
primary key, probably an autonumber, and run an appropriate Append query to
migrate data from the USER_NAMES field. What's appropriate depends on what's
now in the field... examples would be helpful.
 
Back
Top