For debugging purposes, try this:
Code:
'Add this line
Dim sSQL As String
If A Then
sSQL = "DELETE * FROM " & "[tblActive Offer Listing-" & strDept & "]" & "IN '" & strPathxpt & "'"
Else
sSQL = "DELETE * FROM " & "[tblActive Offer Listing-" & strDept & "]" & " Where [tblActive Offer Listing-" & strDept & "].[Offer Number] <= 499 " & "IN '" & strPathxpt & "'"
End If
Debug.Print sSQL
'open the Immediate window (Ctrl-G) to view the SQL string to see if it is a valid string.
DoCmd.RunSQL sSQL
Post back with the results of the debug statement...
--------------------------
I don't use DoCmd.RunSQL because of the warnings that are displayed. To get rid of the warnings, you have to set warnings off, then remember to turn them back on.
I use:
CurrentDb.Execute sSQL, dbFailOnError
The "dbFailOnError" will notify you if there is an error.