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!

Import to Access from Excel (specific guidelines)

Status
Not open for further replies.

RP1America

Technical User
Aug 17, 2009
221
US
Hi!

I would like to find out how to import data into Access from Excel within the guidelines of a few specific needs.

I have an Excel spreadsheet with 3 columns in particular(DATA_ELMNT_ID, Section, and Sub-Section). I also have an Access table with 3 columns in particular (matchfield, church_a, and church_b).

DATA_ELMNT_ID and matchfield correspond. For example, where there is a AA200.PA listed under DATA_ELMNT_ID in the spreadsheet, there is a corresponding AA200.PA in matchfield of the table.

Additionally, the Section and Sub-Section of the spreadsheet contain the data in which I wish to populate into the Access table's columns church_a and church_b, respectively.

Basically, I would like to run VBA code to compare DATA_ELMNT_ID and matchfield. When a match is found, then the value for Section would import to church_a and the value for Sub-Section would import to church_b.

Is this possible within the TransferSpreadsheet method? If not, any other suggestions?

Thank you in advance for your time and help!

 
Can't you link the Excel's table and then use an Update query ?

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top