Well I tried the runSQL statement but I kept getting an error. All I need is to retrieve records....I am not updating or anything like that. Heres the error I get:
a runSQL action requires an argument consisting of a SQL Statement, any ideas as to what i am doing wrong??
Thanks
What are you going to do with this data when you have retrieved it?
It is better to let Access retrieve the data necessary for something when it is needed by specific queries, forms, reports etc rather than do it before the object opens or code runs.
Well I need to run a query based off of selections made from a list box so this needs to be a sql statement...? I am using this for reporting purposes only and I am trying to build a sql statement....Any help?
Thanks
OK, the ultimate aim is to build the report based on the SQL statement.
First step: design your report with its associated query or SQL statement. No problem using the QBE designer and copying the data across, just don't put in restrictions on limiting data from the listbox.
If you run it as is, it should display all data.
Second step: Use your form with the list box to build a Where clause (just the where clause) part of the query.
Third step:
In the form, perhaps on a "Run Report" button:
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.