Dear All
i have the following problem and i am using microsoft access 2000 forms:-
i am working on a system for a store, and i have a table named orders (order id , order_date , order_price, order_company_owner_name), and i have created a form for this table , what i am trying to do is that i want to add a field that calculate the sum of the prices for all the retrived orders (order_price) column for all the orders on the form that will be retrived after filtering the records (records - filter - filter by form) and i want the sum of those records to be calculted once the user click on the calculate button ?
thanks in advance
6 5668
Dear All
i have the following problem and i am using microsoft access 2000 forms:-
i am working on a system for a store, and i have a table named orders (order id , order_date , order_price, order_company_owner_name), and i have created a form for this table , what i am trying to do is that i want to add a field that calculate the sum of the prices for all the retrived orders (order_price) column for all the orders on the form that will be retrived after filtering the records (records - filter - filter by form) and i want the sum of those records to be calculted once the user click on the calculate button ?
thanks in advance
Use the DSum function over your filtered domain:
DSum("[order_price]", "YourFilteredQuery")
Or use DSum with where clause (see example below)
DSum("[order_price]", "YourBaseQuery", "order_date < Xdate")
on the footer of the form add a text box in design view go to the properties of the text box find the controlsource and put this in the controlsource:
=sum(orderprice)
lee123
on the footer of the form add a text box in design view go to the properties of the text box find the controlsource and put this in the controlsource:
=sum(orderprice)
lee123
Many thnaks it works well , but i need to calculate the sum only when the user clicks on a button, not automatically.
any advice on how to calculate the sum of the prices only when i press on the calculate button???
any advice on how to calculate the sum of the prices only when i press on the calculate button???
Here is one way that might work:
1. Set the visible property of the textbox with the calc to no in the forms current event.
2. Make it visible when you click the button: -
Private Sub YourButton_Click()
-
Me.YourTextbox.Visible = True
-
End Sub
-
-
Private Sub Form_Current()
-
Me.YourTextbox.Visible = False
-
End Sub
If you don;t want the calc to occur, visible or not, substitute enabled for visible in the above code.
Sign in to post your reply or Sign up for a free account.
Similar topics
by: kie |
last post by:
hello,
i have a table that creates and deletes rows dynamically using
createElement, appendChild, removeChild.
when i have added the required amount of rows and input my data, i
would like to...
|
by: Omey Samaroo |
last post by:
I have had many questions answered in this forum and I am trusting that one
of the readers may help me find a simple solution.
(1) Using a field called Date_Hired (type: Date/Time), how do I use...
|
by: Lyn |
last post by:
Hi,
I am working on a genealogy form. The only table (so far) lists everybody
in the family, one record per person. Each record has an autonum ID.
The parent form (frmMainForm) displays the...
|
by: luscus |
last post by:
I am trying to device a formula so that when i check of a yes/no box
(done) it will automatically add the time in a field called "End
Time" and at the same time stamp the amount of minutes...
|
by: luscus |
last post by:
Thanks for all the responses on my first question. Unfortunately the
answers I was given were too complicated for my small brain , and
neophite condition to understand. So if you could talk down to...
|
by: kuhni |
last post by:
Hi everybody!
After searching newsgroups for a couple of hours, I now try asking
directly (running the risk of asking again the same question). My
problem is to predict when the size of the...
|
by: robin9876 |
last post by:
In an Access 2000 database on some forms 'Calculating...' is
continuously displayed in the status bar window and the text of the
control is automatically selected.
The only workaround is switching...
|
by: tkq |
last post by:
I have a normal table with customer information
I have a DoB field and I want to have an automatic calculation that will show
the age of the customer in another field next to it called Age
...
|
by: Ecohouse |
last post by:
I have a main form with two subforms. The first subform has the child
link to the main form identity key.
subform1 - Master Field: SK
Child Field: TrainingMasterSK
The second subform has a...
|
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...
|
by: ryjfgjl |
last post by:
ExcelToDatabase: batch import excel into database automatically...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: Vimpel783 |
last post by:
Hello!
Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
|
by: jfyes |
last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
|
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...
|
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....
|
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
|
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...
| |