c9k9h
asked on
Error coding around delete statement
On Error Resume Next
DoCmd.DeleteObject acQuery, "qry_FilteredRecords_GSS"
DoCmd.DeleteObject acQuery, "qry_FilteredRecords_GPC"
On Error GoTo 0
This used to work. But it stopped and I don't know why. Please help!
Thank you.
DoCmd.DeleteObject acQuery, "qry_FilteredRecords_GSS"
DoCmd.DeleteObject acQuery, "qry_FilteredRecords_GPC"
On Error GoTo 0
This used to work. But it stopped and I don't know why. Please help!
Thank you.
On Error Resume Next
DoCmd.DeleteObject acQuery, "qry_FilteredRecords_GSS"
DoCmd.DeleteObject acQuery, "qry_FilteredRecords_GPC"
MsgBox Err.Description
On Error GoTo 0
Try above to see what the error is.
DoCmd.DeleteObject acQuery, "qry_FilteredRecords_GSS"
DoCmd.DeleteObject acQuery, "qry_FilteredRecords_GPC"
MsgBox Err.Description
On Error GoTo 0
Try above to see what the error is.
try taking the commas out
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Mike ... what doesn't work ... ?
xm
xm
n'er mind on the comma thing... the commands are fine.
ASKER
I do get an error message that says the queries don't exist. And they don't. That's why I need the code. I will build them later on with SQL. However, I'm having a problem with 'too few paramters' that I'm working on, so the code doesn't get far enough to rebuild the queries. And it's driving me crazy to keep getting the annoying error that they don't exist. Is there another way to code around it? Like I said, it used to work . . . I don't know why it stopped.
use the QueryExist code I posted....and the if statement.
ASKER
Jeff . . . I've said it before and I'll say it again . . . I'm really glad you experts are out there!
Thank you!
Thank you!
jt is definitely 'Out There', LOL !
mx
mx
You know!! Always happy to help :o)
J
J
you didn't mention any errors...so maybe you should take your Resume Next out and go ahead and capture the error and see what it's saying.
If it's a system error...make a backup now.
J