modifying saved query criteria through VBA

B

Basil

Hi

Is there any way that I can add a criteria to a saved query through VBA

The reason I want to do this is because

I have a form that is used to run a report

-The form has an option group to either 'select all data' or 'choose date range'
-The report is based on a saved query. There is also a graph which has record source that is a query on this saved quer
-The date field has some records that are null - I would want these included if the first option was selected

My idea was to identify which date option they had selected, and if they had selected to choose a date range, I would force the selected dates as a criteria into the saved query. The query is very complex, and I would not know how to set the row source of the chart if I were to try and force all the SQL in through VBA at run time

Can anyone please help

Thanks

Basil
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top