Query on the Fly

adwaitjoshi

Registered User.
Local time
Today, 10:09
Joined
Aug 7, 2002
Messages
32
I am generating a query on the fly depending upon the values of combo boxes on a specific form. When the user clicks "Fetch" button, the constructed select query should fetch the data from a table. Could someone please tell me how can I do this? I am new to MS Access.
Thanks.
 
When i say
Dim QD As QueryDef nothing happens
QueryDef is not listed as an option there. Thats a part of DAO i know so is there anything extra that I need to use DAO ??
I cannot use Dim db As DAO.Database either. Please help
 
I assume you are using Access2000 or greater as ADO is the native language for those versions of Access. You will need to declare Dim db As DAO.Database as you have done and you will need to check the Microsoft DAO 3.6 Object Library in References. Then your code will work.

hth,
Jack
 
I have Access 2002 but still Dim db ad DAO.Database doesnt work

you will need to check the Microsoft DAO 3.6 Object Library in References

Where are these references? Where do I have to check this? Please help. Thanks.
 

Users who are viewing this thread

Back
Top Bottom