chaostheory
Registered User.
- Local time
- Today, 14:33
- Joined
- Sep 30, 2008
- Messages
- 69
I have the worksheet setup through the data import to pull a query from a database and it works great. The problem is each time i run the sheet i have to go into access and change the number of the query i want to pull before i do the import. I have a feeling its with a sql string but im not sure i've never done it before.
How can i pass that number from excel into the query so it only returns the test results for the project number i want instead of going into access to modify the query each time just to change one number??
Right now all that shows in VBA is
I need to be able to modify the WHERE part of this query. The data im pulling is based on an test number. Each time i get a notification a test is done i go into the database and change the query in design view and just put the test number in the "Criteria" so that only that tests results are returned. That criteria is what i want to pass from excel to eliminate the going into access at all.
Thanks for any help, it is appreciated.
How can i pass that number from excel into the query so it only returns the test results for the project number i want instead of going into access to modify the query each time just to change one number??
Right now all that shows in VBA is
Code:
Selection.QueryTable.Refresh BackgroundQuery:=False
I need to be able to modify the WHERE part of this query. The data im pulling is based on an test number. Each time i get a notification a test is done i go into the database and change the query in design view and just put the test number in the "Criteria" so that only that tests results are returned. That criteria is what i want to pass from excel to eliminate the going into access at all.
Thanks for any help, it is appreciated.