troubleshooting Question

Trying to export a table to another Access database file

Avatar of SteveL13
SteveL13Flag for United States of America asked on
Microsoft Access
2 Comments1 Solution85 ViewsLast Modified:
I'm trying to export a table to an external Access database file via VBA code.  The code I'm trying is:

DoCmd.TransferDatabase acExport, "Microsoft Access", LFilename, acTable, "qryHeaderRecordsToArchive", "tblDataHeader- & Me.txtFileNameAndLocation, False"

But it isn't working.  Note LFilename is establish with:

LFilename = DLookup("[ArchiveFileLoc]", "tblSetup") & "\" & Me.txtFileNameAndLocation & ".accdb"

So I'm hoping to get the exported file table to be named tblDataHeader PLUS Me.txtFileName

In other words tblDataHeader-something  (something being the  Me.txtFileNameAndLocation  part of it.
Join our community to see this answer!
Unlock 1 Answer and 2 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 2 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros