473,656 Members | 2,983 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1788
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.c om
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.c om 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.c om
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
1349
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 pricing and databases daily. As they all use different formats etc, I have linked all their data and import using append queries into a single table in a format of my choice. I then manipulate the data and use it to update my pricing according. I...
1
1725
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 tweaked it "just a bit" with code for defaults and stuff, but otherwise, it's pretty much the way the wizards created it (both main form and sub-form). However, I need to either limit the number of transactions my user can input, or limit the...
1
10081
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 editable. But that is not the way I want it. Any suggestions?
4
3393
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 during the month. I'd like to get the totals of the payments and of the charges for each client. When I run the following query, I get huge numbers that appear as if the join is not working correctly.
4
2779
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 and award points for the top averages. what would be the best approach to assigning values according to the ranking? Thanks in advance.
13
11254
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 part (aggregate functions). My problem concerns the sub-totals calculated in the footer part that are not updated when the results are filtered in the form. For exemple, if we have the following results
8
1892
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 Sum(tblPosting.Occurance) FROM tblPosting WHERE (((DatePart("yyyy",.))=DatePart("yyyy",.))) GROUP BY tblPosting.MstClock HAVING (((tblPosting.MstClock)=.));)". If I put this in a query and run the query it works. Any help will be greatly appreciated.
9
4014
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 my fields. When I try to run it I get #errors in my RunTot column. I'm kinda new to this. Not sure if maybe I mistyped something wrong or is there a better way to do this? I have pasted the code. Any help would be greatly appreciated....
2
1513
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 the fields that can be seen by my users. I have a request from a user to create a total for all the fields on the form. For example the form shows Cod and then gives the total 700 Haddock 500 Winter Flounder ...
0
8380
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8710
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
7310
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6162
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5627
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4299
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2721
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1928
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1598
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.