I have been reading postings on this board and have read the MS article on querydef and yet I am still confused...
Basically, I am trying to have one form where users can enter up to 5 criteria for a search, and then I want the results displayed on another form.
I tried copying and pasting the code from the querydef in the Qrysmp97 database and could not get it to work. It told me sub or function not defined for the following line:
If ObjectExists("Queries", "qryDynamic_QBF") = True Then
MyDatabase.QueryDefs.delete "qryDynamic_QBF"
MyDatabase.QueryDefs.Refresh
And if querydef is not the best way to do this, feel free to give me alternative suggestions. I have already tried to create a dynamic SQL statement, but have had no luck (even with guidance from other kind forum members).
Thanks for any help!
[This message has been edited by LQ (edited 08-21-2001).]
[This message has been edited by LQ (edited 08-21-2001).]
Basically, I am trying to have one form where users can enter up to 5 criteria for a search, and then I want the results displayed on another form.
I tried copying and pasting the code from the querydef in the Qrysmp97 database and could not get it to work. It told me sub or function not defined for the following line:
If ObjectExists("Queries", "qryDynamic_QBF") = True Then
MyDatabase.QueryDefs.delete "qryDynamic_QBF"
MyDatabase.QueryDefs.Refresh
And if querydef is not the best way to do this, feel free to give me alternative suggestions. I have already tried to create a dynamic SQL statement, but have had no luck (even with guidance from other kind forum members).
Thanks for any help!
[This message has been edited by LQ (edited 08-21-2001).]
[This message has been edited by LQ (edited 08-21-2001).]