Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old December 12th, 2006, 03:55 PM
BerkshireGuy
Guest
 
Posts: n/a
Default Form that uses totals query

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
Default 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
Default 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
 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles