var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: How to tell if a QueryDef exist on the Access DB ?
Hi I have this code to delete an existing querydef on the Access 97 DB:
but I get an error if the querydef wasn't already there.
So how can I check if it exist then delete ?
You don't need to check if it exists. Just add
On Error Resume Next
in front of your
and it will not halt on error if query is not found.
Or try this:
For Each qdf in db.QueryDefs
If qdf.Name = "qry_ABC" Then
This will search all querydefs and if a match is found, it will try to delete it. However, if the query is open, you can't delete it and you'll have to handle the error.