Another problem total

Charlie2

Registered User.
Local time
Today, 20:44
Joined
Mar 28, 2002
Messages
79
Im having a nightmare getting the figures on this form to total, I cant understand what is wrong, i have done this before.
the total amount I am getting after my calc is £3.95 which is only half of what I would expect.
I am using =sum ([amount]) in the footer of the subform, and in the mainform I am using =frmTestHistorySubform.Form!Cost. What is my mistake here?
http://homepage.ntlworld.com/charlie_chuck/Jade.mdb

Charlie
 
To refer to a control on a subform you have to use the following syntax.

Forms![main form name]![subform control name].Form![control name]

You cannot refer to controls on a subform with the following syntax:

Forms![subform name]![control name]

This is because a subform on a main form is not a form, but is a control just like a text box or a list box. You must refer to a subform as a control rather than a form, and specify the Form identifier following the subform control name reference to gain access to the controls on a subform.
 
I dont get it

Ive used the exact method I used on Jade on another main form subform and it works. I just cannot understand why this one should be any different, I am looking at the working version now and im puzzled.

Charlie
 
ahh got it

I used, =[frmTestHistorySubform].[Form]![txtAmount] is that what you were saying.

Charlie
 

Users who are viewing this thread

Back
Top Bottom