Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

automatic find and replace

Status
Not open for further replies.

nshenry03

Technical User
Feb 9, 2006
60
0
0
US
I've got an access database and an excel file. I imported the excel file into a new table in access as is. the excel file has for example a field called purchase orders, a PO table in my access database has POID and a PONum as fields. I want to go through the excel file and change all of the PO numbers (PO1052A for example) to the ID number that corresponds to it (PO1052A is 1723 for example) any easy way to do this (replace the old PO numbers with their corresponding ID numbers)?
 
How do you know what POID goes with what PO Number? An Update query is usually will do what you want.

Some example data goes a long way in helping explain/understand what you are trying to accomplish (like what the excel file looks like after it's imported and what field there matches what field in the Access table)


Leslie

Anything worth doing is a lot more difficult than it's worth - Unknown Induhvidual

Essential reading for anyone working with databases:
The Fundamentals of Relational Database Design
Understanding SQL Joi
 
We are trying to convert to an access database, so, I took the excel file, copied the PONumber column from the TEMP (excel) table and pasted into the PONUM Column of the PO Table, access automatically assigned numbers in the POID field. I then went through and deleted all of the duplicates in the PO Table.

I now want to go back into the TEMP table and replace PONumber with corresponding values of POID from the POs table.

so for example
TEMP (Table)
PONumber
PO152
PO154
PO155A
PO152
PO155A

PO (Table)
POID
1 PO152
2 PO154
3 PO155A

And afterwards
TEMP (Table) would look like
PONumber
1
2
3
1
3
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top