ok, I did a little more digging into this. First, there is a username and password for accessing the ODBC servers, which I did enter at the start of the code. For whatever reason, the system seemed to forget that I entered this in, while I was developing
more queries to put into the code.
Now, the code runs, but when it gets to the last line, just before the msgbox, it gives me that same error message. What I did notice is, my database goes from 5.8M to 1.99G during the course of running the code. Could this be causing my problem and not
the actual access to the ODBC server?
Here is the code that I am running.
Private Sub Command0_Click()
DoCmd.SetWarnings False
DoCmd.OpenQuery "make_tblAMAPS_BOM_16_1", acViewNormal, acEdit
DoCmd.OpenQuery "make_tblAMAPS_BOM_17_1", acViewNormal, acEdit
DoCmd.OpenQuery "make_tblAMAPS_BOM_46_1", acViewNormal, acEdit
DoCmd.OpenQuery "make_tblAMAPS_BOM_56_1", acViewNormal, acEdit
DoCmd.OpenQuery "make_tblAMAPS_BOM_57_1", acViewNormal, acEdit
DoCmd.OpenQuery "make_tblAMAPS_BOM_85_1", acViewNormal, acEdit
DoCmd.TransferText acExportDelim, "AMAPS_BOM", "tblAMAPS_BOM_16_1", "C:\Users\Desktop\AMAPS_BOM_16_1.TXT", True, ""
DoCmd.TransferText acExportDelim, "AMAPS_BOM", "tblAMAPS_BOM_17_1", "C:\Users\Desktop\AMAPS_BOM_17_1.TXT", True, ""
DoCmd.TransferText acExportDelim, "AMAPS_BOM", "tblAMAPS_BOM_46_1", "C:\Users\Desktop\AMAPS_BOM_46_1.TXT", True, ""
DoCmd.TransferText acExportDelim, "AMAPS_BOM", "tblAMAPS_BOM_56_1", "C:\Users\Desktop\AMAPS_BOM_56_1.TXT", True, ""
DoCmd.TransferText acExportDelim, "AMAPS_BOM", "tblAMAPS_BOM_57_1", "C:\Users\Desktop\AMAPS_BOM_57_1.TXT", True, ""
DoCmd.TransferText acExportDelim, "AMAPS_BOM", "tblAMAPS_BOM_85_1", "C:\Users\Desktop\AMAPS_BOM_85_1.TXT", True, ""
DoCmd.OpenQuery "make_56_All_Item_Master", acViewNormal, acEdit
DoCmd.OpenQuery "app_16_All_Item_Master", acViewNormal, acEdit
DoCmd.OpenQuery "app_17_All_Item_Master", acViewNormal, acEdit
DoCmd.OpenQuery "app_46_All_Item_Master", acViewNormal, acEdit
DoCmd.OpenQuery "app_57_All_Item_Master", acViewNormal, acEdit
DoCmd.OpenQuery "app_85_All_Item_Master", acViewNormal, acEdit
DoCmd.OpenQuery "make_16_All_BOMs", acViewNormal, acEdit
DoCmd.OpenQuery "app_17_All_BOMs", acViewNormal, acEdit
DoCmd.OpenQuery "app_46_All_BOMs", acViewNormal, acEdit
DoCmd.OpenQuery "app_56_All_BOMs", acViewNormal, acEdit
DoCmd.OpenQuery "app_57_All_BOMs", acViewNormal, acEdit
DoCmd.OpenQuery "app_85_All_BOMs", acViewNormal, acEdit
MsgBox "Exports Complete"
End Sub