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
|
|||
|
|||
A form with a combo box; subform; text box.....need a total in the
I'm new at Access but I have created a Database with some tables and a Form.
In the form I have a Combo Box (pulld own menu) which reads from a table. It reads the field titled Projects, which list each project I am working on......I have a subform which produces all the change orders for a particular job (which ever project I chose with combo box)......so say for example I pick project PV-3552 in the combo box....below that in the subform all the change orders for PV-3552 will pop up.......each change order has an individual cost listed when it pops up. Next to my combo box I inserted a Text Box.....and I want this text box to have the total cost of the change orders for PV-3552. can someone please tell me how to do this? Mark |
#2
|
|||
|
|||
A form with a combo box; subform; text box.....need a total in the
Hi Mark
Open the subform in design view Select "View" then select view footer In the foot add an unbound text box - call it ProjectTotal The control source for the box should be =Sum([Name Of Cost Field]) Save and close Open the main form in design view Select the combo box Open the properties box and select the event column Select AfterUpdate Select the build option (...) and select code Add this code Private Sub ComboName_AfterUpdate() Me.TextBoxName = Me.SubFormName!ProjectTotal End Sub Note that in the code "TextBoxName" is the name of the new text box you have next to your combo Hope this helps -- Wayne Manchester, England. Enjoy whatever it is you do Scusate,ma il mio Inglese fa schiffo :-) Percio se non ci siamo capiti, mi mandate un messagio e provero di spiegarmi meglio. "mark" wrote: I'm new at Access but I have created a Database with some tables and a Form. In the form I have a Combo Box (pulld own menu) which reads from a table. It reads the field titled Projects, which list each project I am working on......I have a subform which produces all the change orders for a particular job (which ever project I chose with combo box)......so say for example I pick project PV-3552 in the combo box....below that in the subform all the change orders for PV-3552 will pop up.......each change order has an individual cost listed when it pops up. Next to my combo box I inserted a Text Box.....and I want this text box to have the total cost of the change orders for PV-3552. can someone please tell me how to do this? Mark |
Thread Tools | |
Display Modes | |
|
|