How would I check programmatically that a querydef already exists.
I.e. something along these lines:
It's the If line I'm interested in. strQueryDef is a string variable which contains the name of the relevant query.
Help!
I.e. something along these lines:
Code:
If Db.QueryDefs(strQueryDef).Exist = False Then
Set QD = Db.CreateQueryDef(strQueryDef, strSQL)
Else
..... and so on.
It's the If line I'm interested in. strQueryDef is a string variable which contains the name of the relevant query.
Help!