deriving totals based on a combo box

kevin19

Registered User.
Local time
Today, 01:39
Joined
Jan 28, 2013
Messages
81
Hi All!

Wish everyone well!
I have a combo box named Session which comprises of am and pm.
I have a number of fields that relate to this combo box.
E.G. Monday am Sales £1000
Monday pm Sales £2000
I want to create a total Sales of the am and pm to derive a total of £3000.i.e. Monday Sales is £3000 which is a combination of the am and pm sessions.
I hope I manage to express myself clearly.
Can anyone please help as to how I can do that in a report or query? I have been trying googling and searching but still cannot find a solution yet.

Thanks!
 
if you have separate fields that show the sales then create a new control to calculate the total. in the property "Control Source" of the new control enter the following

=[amtotal] + [pmtotal]

the fields holding the totals must be formatted as a number or else you will get 22 instead of 4 when adding 2 + 2.

Replace [AMtotal] and the [PMtotal] with the control names on your form.
 
Hi gerry

Thanks for your prompt response! I am afraid I cannot get what you are saying.
In my form, the field session is combo box where the row values are "AM","PM" and "All Day". There is a field corresponding to this combo box where I input the Sales value.
e.g. I select AM and in the sales textbox I enter the value, say, £1000
next record I select PM and enter the value, say, £2000 for that Sales session
Therefore, total sales for the day is £1000 + £2000= £3000.
so there are 2 records.
How can I combine the AM and PM sessions to output the Sales to reflect £3000.
As both the AM and PM sessions are using the same Sales textbox but on 2 records.
I am sorry I am not very good at expressing myself. I hope you manage to understand what I am trying to achieve here.
Thanks!
 
What are the fields in you table? and what Event happens and (the event code or macro instructions) when you select the combobox and change between AM and PM. Perhaps if you can attach a copy of the Form and the Table.
 
I don't understand too much.
Have you a field in the table where you store information like AM, PM ???? How you store the Date ?
Can you post a snapshot from the relationship window ?
 
Where do you want to use the value in a report or a form?
 
Dear All
Thanks for your response! I am sorry I was out of action for a little while.
The values AM, PM are stored in the field named Session in a table. I need to use these values in a report.The date field is stored separately in another field named Date.
 
So, forget about AM, PM and create a query where to sum by dates.
Or, if you wish this in a report, group by dates.
 

Users who are viewing this thread

Back
Top Bottom