0

Can I get some assistance with the T SQL syntax required to use the contents of this combo box in a pass thru query in order to improve performance response time over the LAN

[Forms]![WELCOME]![FILTER_BUILDER].[Form]![Combo28]

Apparently TSQL doesn't like the "!" from Access:

SELECT dbo_A_VIEW_LOWEST_LEVEL.contract, dbo_A_VIEW_LOWEST_LEVEL.[Profit Center Name], dbo_A_VIEW_LOWEST_LEVEL.MATERIAL_DESC, dbo_A_VIEW_LOWEST_LEVEL.cust_Name, dbo_A_VIEW_LOWEST_LEVEL.cust_id, dbo_A_VIEW_LOWEST_LEVEL.mat_id, dbo_A_VIEW_LOWEST_LEVEL.pc, dbo_A_VIEW_LOWEST_LEVEL.MEMO, dbo_A_VIEW_LOWEST_LEVEL.SUP_ACCT, dbo_A_VIEW_LOWEST_LEVEL.act_id, dbo_A_VIEW_LOWEST_LEVEL.actuals, dbo_A_VIEW_LOWEST_LEVEL.budget, dbo_A_VIEW_LOWEST_LEVEL.forecast, dbo_A_VIEW_LOWEST_LEVEL.link, dbo_A_VIEW_LOWEST_LEVEL.bud_var, dbo_A_VIEW_LOWEST_LEVEL.fcst_var, dbo_A_VIEW_LOWEST_LEVEL.CDEPMNT, dbo_A_VIEW_LOWEST_LEVEL.MNTATT, dbo_A_VIEW_LOWEST_LEVEL.MNTCM, dbo_A_VIEW_LOWEST_LEVEL.MNTCPI, dbo_A_VIEW_LOWEST_LEVEL.MNTCPROB, dbo_A_VIEW_LOWEST_LEVEL.MNTHELD, dbo_A_VIEW_LOWEST_LEVEL.MNTIMPOC, dbo_A_VIEW_LOWEST_LEVEL.MNTIMSD, dbo_A_VIEW_LOWEST_LEVEL.MNTMIGR, dbo_A_VIEW_LOWEST_LEVEL.MNTOTH, dbo_A_VIEW_LOWEST_LEVEL.MNTQ4IM, dbo_A_VIEW_LOWEST_LEVEL.MNTRECVD, dbo_A_VIEW_LOWEST_LEVEL.MNTSWSD, [pc] & [cust_id] AS CUSTLINK, dbo_A_VIEW_LOWEST_LEVEL.MNTIMPOC
FROM dbo_A_VIEW_LOWEST_LEVEL
WHERE (((dbo_A_VIEW_LOWEST_LEVEL.SUP_ACCT)=[Forms]![WELCOME]![FILTER
2
Contributors
2
Replies
3
Views
7 Years
Discussion Span
Last Post by miweiser
0

From what I could determine, it looks like the only way to accomplish that is to dynamically create the query with the desired criteria. Pass-through queries cannot use parameters and they are parsed and run on the remote server. They don't have any knowledge of your local database and its forms.
Here's just one of the links I ran across that discusses it: http://www.pcreview.co.uk/forums/thread-1182381.php

You could probably create the query based on the update event from the combo box if you wanted to go that route.

0

From what I could determine, it looks like the only way to accomplish that is to dynamically create the query with the desired criteria. Pass-through queries cannot use parameters and they are parsed and run on the remote server. They don't have any knowledge of your local database and its forms.
Here's just one of the links I ran across that discusses it: http://www.pcreview.co.uk/forums/thread-1182381.php

You could probably create the query based on the update event from the combo box if you wanted to go that route.

Thank you very much, I was leaning towards that reality, now I will weigh out programming the on update event or just go forward with an ASPX page to reduce lag response.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.