A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

A form with a combo box; subform; text box.....need a total in the



 
 
Thread Tools Display Modes
  #1  
Old December 11th, 2006, 03:17 PM posted to microsoft.public.access.forms
Mark
external usenet poster
 
Posts: 1,534
Default 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  
Old December 11th, 2006, 06:45 PM posted to microsoft.public.access.forms
Wayne-I-M
external usenet poster
 
Posts: 3,674
Default 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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 05:39 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.