By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,490 Members | 1,221 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,490 IT Pros & Developers. It's quick & easy.

Form that uses totals query

P: n/a
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

Dec 12 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a
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:
>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

Dec 12 '06 #2

P: n/a
Thats for the suggestions. I think I am going to need to do a
querydef.
kingston via AccessMonster.com wrote:
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:
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
Dec 12 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.