If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
sum combo box based on other combo box
Hi can anyone help
i have two combo box which are Customer Number and Period Posting Date coming from the same table, what i'm after is after combo box which will give me all value for each Customer in a specific posting Date month for example if some select Customer Number 0001 in combo box 1 and then select 2009/07 in Combo box 2 i want combo 3 or a text box to sum the values in thee amount column and display the total in combo 3 or they text box thanks in advance |
#2
|
|||
|
|||
sum combo box based on other combo box
If you don't have to store the total (and you shouldn't store calculated
results), a simple expression in the controlsource property of the text box: = Combo1.Column(2) + Combo2.Column(4) Column 2 is the 3rd column. and Column 4 is the 5th column. If you don't need to store it, use the AfterUpdate event of each combo to check for a valid value in the other combo, then write the calculation to the textbox. -- Arvin Meyer, MCP, MVP http://www.datastrat.com http://www.accessmvp.com http://www.mvps.org/access "Alan" wrote in message ... Hi can anyone help i have two combo box which are Customer Number and Period Posting Date coming from the same table, what i'm after is after combo box which will give me all value for each Customer in a specific posting Date month for example if some select Customer Number 0001 in combo box 1 and then select 2009/07 in Combo box 2 i want combo 3 or a text box to sum the values in thee amount column and display the total in combo 3 or they text box thanks in advance |
#3
|
|||
|
|||
sum combo box based on other combo box
"Arvin Meyer [MVP]" wrote: If you don't have to store the total (and you shouldn't store calculated results), a simple expression in the controlsource property of the text box: = Combo1.Column(2) + Combo2.Column(4) Column 2 is the 3rd column. and Column 4 is the 5th column. If you don't need to store it, use the AfterUpdate event of each combo to check for a valid value in the other combo, then write the calculation to the textbox. -- Arvin Meyer, MCP, MVP http://www.datastrat.com http://www.accessmvp.com http://www.mvps.org/access "Alan" wrote in message ... Hi can anyone help i have two combo box which are Customer Number and Period Posting Date coming from the same table, what i'm after is after combo box which will give me all value for each Customer in a specific posting Date month for example if some select Customer Number 0001 in combo box 1 and then select 2009/07 in Combo box 2 i want combo 3 or a text box to sum the values in thee amount column and display the total in combo 3 or they text box thanks in advance . Hi thanks for replying but This is still not working, maybe i've done something wrong But combo box 1 is a customer number 0001 feild(0) combo box 2 is a posting date 2009/07(1) Then i have an amount field with all sales that went through what i need is the textbox to look up on the combo box 1(Customer Number) which and then look up on combo box 2(Posting Date), then once is lookup on those variables in the combo boxs, SUM all values for that customer and on that month and display it eg combo box 1 - customer number 0001 Combo Box 2 - Posting period date 2009/07 Text Box - Amount £5000 Thanks again, sorry if it seems confusing |
Thread Tools | |
Display Modes | |
|
|