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.