Rich_Lovina
Registered User.
- Local time
- Today, 18:53
- Joined
- Feb 27, 2002
- Messages
- 225
Hi there, Using both macros & code, now tired of all macros. I use a form (tied to code which defaults to C:\My Docs), but I would prefer a form to pop-up with previous week's filepath, as outlined here in my first converted macro Module, called GetNewData.
In other words, is there code which can create a form where I change this file path in this code, WITHOUT having to open this module each week?
There are five tables to import, file path being same throughout:
Function GetNewData()
On Error GoTo GetNewData_Err
DoCmd.TransferDatabase acImport, "Microsoft Access", "D:\PUB\XS2925-07-2002.mdb", acTable, "Appointments", "PSAppointments", False
DoCmd.Echo False, "Importing PS Appts"
DoCmd.TransferDatabase acImport, "Microsoft Access", "D:\PUB\XS2925-07-2002.mdb", acTable, "PromotionsNonAdVacs", "PSPromNon", False
DoCmd.Echo False, ""
DoCmd.TransferDatabase acImport, "Microsoft Access", "D:\PUB\XS2925-07-2002.mdb", acTable, "SESEngagements", "PSSESEngagements", False
DoCmd.Echo False, "Importing PSEng"
DoCmd.TransferDatabase acImport, "Microsoft Access", "D:\PUB\XS2925-07-2002.mdb", acTable, "SESPromotionsToAdVacs", "PSSESPromos", False
DoCmd.Echo False, "Importing PSSESPromos"
DoCmd.TransferDatabase acImport, "Microsoft Access", "D:\PUB\XS2925-07-2002.mdb", acTable, "Transfers", "PSTransfers", False
DoCmd.Echo False, "LastRun"
GetNewData_Exit:
Exit Function
Many thanks in advance
In other words, is there code which can create a form where I change this file path in this code, WITHOUT having to open this module each week?
There are five tables to import, file path being same throughout:
Function GetNewData()
On Error GoTo GetNewData_Err
DoCmd.TransferDatabase acImport, "Microsoft Access", "D:\PUB\XS2925-07-2002.mdb", acTable, "Appointments", "PSAppointments", False
DoCmd.Echo False, "Importing PS Appts"
DoCmd.TransferDatabase acImport, "Microsoft Access", "D:\PUB\XS2925-07-2002.mdb", acTable, "PromotionsNonAdVacs", "PSPromNon", False
DoCmd.Echo False, ""
DoCmd.TransferDatabase acImport, "Microsoft Access", "D:\PUB\XS2925-07-2002.mdb", acTable, "SESEngagements", "PSSESEngagements", False
DoCmd.Echo False, "Importing PSEng"
DoCmd.TransferDatabase acImport, "Microsoft Access", "D:\PUB\XS2925-07-2002.mdb", acTable, "SESPromotionsToAdVacs", "PSSESPromos", False
DoCmd.Echo False, "Importing PSSESPromos"
DoCmd.TransferDatabase acImport, "Microsoft Access", "D:\PUB\XS2925-07-2002.mdb", acTable, "Transfers", "PSTransfers", False
DoCmd.Echo False, "LastRun"
GetNewData_Exit:
Exit Function
Many thanks in advance
Last edited: