How to pass criteria to query in Access (1 Viewer)

tmyers

Well-known member
Local time
Today, 15:12
Joined
Sep 8, 2020
Messages
1,090
I am further elaborating on a question I asked Friday to provide a little context (https://www.access-programmers.co.u...h-narrowing-down-a-query.320150/#post-1793077).

I am letting Access do all my data gathering and heavy lifting, but am using Excel to display the data as Excel has nicer options for graphs, charts etc. (Plus more of users better understand Excel and its interface). I have linked my queries within Excel to pull the data out of the DB, but can't seem to figure out if I can pass criteria to the query or not from within Excel (an example is I want to be able to change which salesman number the query is searching for). Most of my queries are crosstab, and the only solution (easy one at least) I found to be able to link them in Excel was to wrap the crosstab in a general Select query, but doing that for every salesmen seems like a backwards way of doing it.

Currently there are 4 total queries. 1 basic select query that determines what year and salesman to search for, then 3 crosstabs that break that query down to different aspects, such as profit %, profit dollars etc. I would want to change the criteria for that first select query.
 

Minty

AWF VIP
Local time
Today, 20:12
Joined
Jul 26, 2013
Messages
10,371
Why not make an interface in Access to export the cross tabbed results to Excel with an appropriate filter?
That would give you the desired results in Excel, but without the faff of trying to automate from it?
 

tmyers

Well-known member
Local time
Today, 15:12
Joined
Sep 8, 2020
Messages
1,090
I suppose that would be the easier way to handle it. Linking them within Excel seemed the easier route at first.
 

Users who are viewing this thread

Top Bottom