473,324 Members | 2,535 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

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

Dec 12 '06 #1
2 1767
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Michael Plant | last post by:
Hi all. I'm trying to write my first Access database and I'm getting on well. It's for my own small business use and the scenario is this. I have 4 or 5 suppliers who all email their product...
1
by: Ron | last post by:
I have a pre-printed form that I've basically duplicated in Access 2000 with the form wizards. It uses a main form for the basic info on a client, then a subform for the transaction lines. I've...
1
by: libbythomas | last post by:
I created an Access 2000 form from a query. But I cannot edit it. I can flip through the records. If I create a table from the query (maketable) and then create the form from the table, it is...
4
by: New Guy | last post by:
I'm trying to work with a system that somebody else built and I am confounded by the following problem: There is a table of payments and a table of charges. Each client has charges and payments...
4
by: Jim | last post by:
I have a form that is using a query for the control source. The query put the data in order of TOP 20. I've added an extra textbox in the form and want to be able to automatically rank the records...
13
by: terrybens | last post by:
Hello, I'm using a Microsft Access 2000 Project (adp file) connected to MS SQL Server 2000 database. I have created a continous form having a detail part (results of the query) and a footer...
8
by: JH001A | last post by:
I have a form with a text box for YTD totals on an employee which is selected from a combo box, the YTD total displays #name? when I run the form. The control source is "=(SELECT...
9
by: JJM0926 | last post by:
I'm trying to create a running totals query in access 97. I have followed the directions on how to do it from Microsofts website article id 138911. I took their code they had and replaced it with...
2
by: sillyr | last post by:
Hi - My database is using Access 2007. I created a simple query from two linked tables that sums up the data for all records for 11 different fields. Then I made a form that shows the totals for...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.