Importing - Get Value From Access In Excel

CharlesWhiteman

Registered User.
Local time
Today, 08:48
Joined
Feb 26, 2007
Messages
421
Hi all, I'm trying to get my head around one or two things, importing into access related.

In my Db I give each company an account number, IN001, for example. I have a spreadsheet of companies which I want to import. But i need to get the account number first to populate the cell in excel first.

In my Db when i manually enter a new company i have some VB code which works out what the account number should be (Letters/Numbers - Sequencial)

Dooes anyone know how i might do some code in excel to lokup my access db and do a similar thing or suggest a better way of dong it? Ta.
 
you could import the spreadsheet of companies into a temporary table (File>Get External Date>import...) in Access, create a recordset from that, then loop through that recordset, running the same VB code on the company name that you used in the original form to create the company code. I'm assuming this is the same code you asked for help on a few weeks ago. Then when you've done that. Delete the temporary table, et voila!

HTH,
Chris
 
Use a parameter query. See Excel help. Or THIS
 

Users who are viewing this thread

Back
Top Bottom