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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Mass Import / Primary Key Lookup

Status
Not open for further replies.

bcooler

Programmer
Jun 13, 2009
132
I'm going to try this again to see if I can get a little more help. I think my original description was a little confusing....

I have a "Maintenance" form that I created which allows upper level users to associate information in a Recall table with information from a Unit table (Recall 123 has an associated part number ABC and serial number 789). Unfortunately, since different part numbers can contain the same serial numbers (a Chevy and Ford may have the same Serno), I use the primary key as the unique identifier for a given unit (in example above, recall 123 now contains primary key# 347), and must store the primary key, not the serial number, as part of the associated recall. If I only had a few serial numbers in a given recall, I could manually look up the primary key for a given part number/serial number and enter that into the Recall form field. However, I may have hundreds of numbers to enter and do not want to do a manual lookup for each.

What I'm looking for is a way to do a mass paste (from Excel maybe) of part numbers and serial numbers into a Recall form, but storing the associated primary key for each pasted item instead of the pasted information itself. As you can see, the difficulty is having Access reverse-lookup the primary key information from a list (not single entry).

Sorry for the long detail. Hopefully this makes more sense.
 
bcooler,

You still have an issue with this?

It seems to me that you should use a temporary table, import your spreadsheet into it and then perform your pk lookup / store.

All of this would of course happen at the click of a button, however the Excel / CSV file format would have to be formalized / consistent.

I perform something like this regularly.

Get back if you still require help.

ATB

Darrylle


Never argue with an idiot, he'll bring you down to his level - then beat you with experience.
 
Yes, I got alternate help already to perform a Append query against a linked spreadsheet. It works good.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top