Here is the code:
Code: Select all
'Print the records in the tables
DoCmd.OpenTable "PA-ACT-HEADERS-TRAILERS", acViewNormal, acEdit
DoCmd.PrintOut acPrintAll, , , acHigh, 1, True
DoCmd.Close acTable, "PA-ACT-HEADERS-TRAILERS"
DoCmd.OpenTable "PA-ELIG-HEADERS-TRAILERS", acViewNormal, acEdit
DoCmd.PrintOut acPrintAll, , , acHigh, 1, True
DoCmd.Close acTable, "PA-ACT-HEADERS-TRAILERS"
'DELETE THE TABLES
DoCmd.DeleteObject acTable, "PA-ACT-HEADERS-TRAILERS"
DoCmd.DeleteObject acTable, "PA-ELIG-HEADERS-TRAILERS"<------------------
The next line receives this: Error Message 2208: You cannot delete the database object PA-ELIG-HEADERS-TRAILERS while it's open.
Doesn't this line close the table? DoCmd.Close acTable, "PA-ACT-HEADERS-TRAILERS"
I appreciate your help as always.
Thank you.
Michael