Macro to Import Table

esskaykay

Registered User.
Local time
Today, 08:37
Joined
Mar 8, 2003
Messages
267
I have a macro that imports a table from a network drive. I have hard coded in the path. However, each year file location changes. Is there a way in a Macro to adjust the code based on some other parameter?

Under the "TransferDatabase" action, for the "Database Name", I hard coded:

y:\sidewalks\2006\swk_master.mdb

However, I want the 2006 to automatically come from some other location. Here’s what I tried to no avail (where I wanted the dlookup to return 2006):

y:\sidewalks\(DLookUp("[year]","[tblYear]","[Item]='year'"))\swk_master.mdb

Thanks,
SKK
 

Users who are viewing this thread

Back
Top Bottom