Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Import problem with runtime

Status
Not open for further replies.

philcon

Technical User
Feb 5, 2002
139
GB
Can anyone help with this.

This coding is to import a spreadsheet into an existing table and stripout any erroneous data.

It works fine on normal version of access (win XP MsA2002) but when I package it with the runtime version and deploy on a single user machine, I get an indiscriminate runtime error before the application quits.

I think the user may be on a different windows version, but does anyone have any other ideas what may be causing the problem.

Many thanks in advance


Phil.

The code is :

Dim MySQL As String
Dim MySQL2 As String
Dim MySQL3 As String

DoCmd.SetWarnings False

MySQL = "Delete tbl_imp_BLDat.type " & _
"FROM tbl_imp_BLDat "

DoCmd.RunSQL MySQL

DoCmd.TransferSpreadsheet acImport, 8, "tbl_imp_BLDat", "c:\bauschdat.xls", True, "bauschdat2"

MySQL2 = "Delete tbl_imp_BLDat.type " & _
"FROM tbl_imp_BLDat " & _
"WHERE (((tbl_imp_BLDat.type) = ""0""))"

DoCmd.RunSQL MySQL2

MySQL3 = "Delete tbl_imp_BLDat.country " & _
"FROM tbl_imp_BLDat " & _
"WHERE (((tbl_imp_BLDat.country) = ""0""))"

DoCmd.RunSQL MySQL3

DoCmd.OpenQuery "q_dlt_remTotalsBL"

DoCmd.SetWarnings True
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top