field total on a subform

  • Thread starter Thread starter PF
  • Start date Start date
P

PF

Hi all

I have a subform with a datasheet in it

On the form i have a textbox who should display a total of qty

if i give the textbox the formula

forms!frmMain!frmSub.form!sum(qty)

it dont work.

To make it work i put a textbox name tot (=sum(qty)) on the subform

and i give the textbox on the main form datasource=tot

It works but is there amore direct way?

Plus now i have a message in the status bar saying
"impossible to update this set of data" or something like that
("impossible de mettre a jour ce jeux d'enregistrements")
i think it is related to the field i add on the subform.
 
Placing the text box into the Form Footer section of the subform will be the
most efficient and stable approach.

Like all calculated controls, the total will be read-only, but it should not
make the rest of the form read-only.
 
Thanks for the answer,

Is there a way to do that when
my subform is an active data sheet.

I cant see the footer when in active
datasheet. The datasheet look nice and clean.
if i want to reproduce the look with the other type i dont know what
font to use.

regards,
pf
 
If the subform is open in datasheet view, you will not see the form footer
section, but you can still refer to it as you mentioned in your original
post.

The Orders subform in the Northwind sample database has an example.
 
Back
Top