getting total into main form from continious subform

M

me

I first have to say thtat I am fairly new to access and am a quick learner.
I still have a few problem I have to try and get working in my very first
database.

I have a main form called TimeCard where my fields are;
TimeCardID (Autonumber)
Employee (Combo Box)
WeekOF (Text Box)
I also have a subform called TimeCardHours linke to the main form.
In this form I have;
TimeCardDetailID (Autonumber)
DateWorked (text Box)
Project (ComboBox)
Reg, OT, Capital, Vacation etc and at the end I have total reg and total
OT

Right now I get my TotalReg and TotalOt by using the expression
(=[regular]+[Capital] etc.......)
My subform is set to continious because I have multiple # of records for the
WEEKOF in the subform. My question is how do I talley all of the TotalReg
and TotalOT in the continious subform and put the value in to the footer of
the main TimeCard form. I do not want this value to be added to all the
Main form records, just keep the total generated in relation to the
TimeCardID.


I hope I haven't confused everyone yet.
 
R

Rob Parker

Calculate your totals in the subform, using a control in the subform's
footer, which will have an expression such as

=sum([FieldName])

If you name this control tboxTotalField, you will be able to display its
contents in a textbox in the main form by using the expression

=[subformName].Form.tboxTotalField

If you need an example of this, look at the Orders form in the Northwind
database.

HTH,

Rob
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top