Parameters in a Pass-Through Query?

programmerbob

New Member
Joined
Jul 22, 2004
Messages
26
I want a user to input some information.

I was wondering if anyone has done this. I don't mind if it's code or not(I think it does have to be code).

The way the data tables are(I have no control over this), to get my information(using a subquery) I can't do a make table query and then filter that way.

Thanks
 

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).
Check out Access's help on parameter queries.
 
Upvote 0
I have done this and it would have to be code. The way that I've done this is to set up text boxes on a form for the parameters that you want, capture those values in variables, and then use the Querydef object to build an on-the-fly query based off of a combination of whatever SQL you can get away with hard-coding and the SQL from your variables. You'll have to look up the properties and methods of the DAO.QueryDef object, but to answer your question, it is possible to do.

*edit* JMiskey, I think that he specifically needs information on Pass-Through queries with parameters, which is impossible with conventional Access query parameters.
 
Upvote 0
*edit* JMiskey, I think that he specifically needs information on Pass-Through queries with parameters, which is impossible with conventional Access query parameters.
The details were pretty vague in the original post, so I thought I would start there (no need to make things more complicated than they have to be), but if it is a more complex issue, you are correct in that they will have to use code.
 
Upvote 0

Forum statistics

Threads
1,221,827
Messages
6,162,202
Members
451,752
Latest member
freddocp

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top