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

Import file name that changes

Status
Not open for further replies.

surfbum3000

Technical User
Aug 22, 2003
156
US
I want to import a file name that changes on the 1st of every month. I am using a macro to link to a table within the database. Is there a way I can import a Database Name that changes every month, on the 1st of the month? The format of the filename is MMYYYYCALLS.MDB. The current filename is 062005CALLS.MDB and on 07-01-2005 a new file will be created named 072005CALLS.MDB which I will need to link to.

Action=TransferDatabase
Transfer Type=Link
Database Type=Microsoft Access
Database Name=C:\LOGS\072005CALLS.MDB
Object Type=Table
Source=LoggedCalls
Destination=LoggedCalls
Structure Only=No
 
Have a look at the DoCmd.TransferDatabase method you can play with in VBA and at the Format and Date VBA functions.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top