Connecting Tech Pros Worldwide Help | Site Map

Form that uses totals query

  #1  
Old December 12th, 2006, 03:55 PM
BerkshireGuy
Guest
 
Posts: 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

  #2  
Old December 12th, 2006, 04:45 PM
kingston via AccessMonster.com
Guest
 
Posts: n/a

re: Form that uses totals query


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

  #3  
Old December 12th, 2006, 05:25 PM
BerkshireGuy
Guest
 
Posts: n/a

re: Form that uses totals query


Thats for the suggestions. I think I am going to need to do a
querydef.


kingston via AccessMonster.com wrote:
Quote:
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
Closed Thread


Similar Threads
Thread Thread Starter Forum Replies Last Post
Access as Frontend to Oracle questions - Memo-to-CLOB? View vs. Query? jonceramic answers 5 February 3rd, 2007 02:05 AM
How to add records using Query John answers 7 November 13th, 2005 10:15 AM
edit a read only access form libbythomas@libertyresources.org answers 1 November 13th, 2005 09:42 AM
How to Energize a Dreadfully Slow Query Rolan answers 15 November 13th, 2005 07:43 AM