field total on a subform

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.
 
A

Allen Browne

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.
 
P

PF

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
 
A

Allen Browne

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.
 

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