Do you have a control on the dashboard that can be used to provide the query
paramter? I.E. the query criteria would be [Forms]![DashBoardForm]!
[cboAgency]. Otherwise, try duplicating the underlying SQL and construct a
new record source string based on user input. You can specify the where
clause in the OpenForm command but if the underlying query requires a
parameter, Access doesn't know that these two things are linked.
BerkshireGuy wrote:
Quote:
>I have a form that acts like a dashboard to show summarized data.
>Currently, this form gets its summarized values from a total's query.
>
>When the user selects to run the dashboard, they should be able to run
>company wide (all agencies) or specific agencies.
>
>So I figured I evaulate in code what they want and pass an where clause
>based on their selection using Do
>
>I am having trouble passing the where clause. It keeps prompting me
>for the parameters (Agency).
>
>A couple of thoughts:
>
>1) Is it best to have the form use a query that is not a totals query
>and then do the summarized functions in the controlsource of each
>control? I would think I could then pass the parameters on the
>OpenForm method.
>2) Can you pass a where clause to a forms that uses a totals query with
>the OpenForm method?
>
>Thanks
|
--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...ccess/200612/1