Read a field in a sub form to a field in a main form

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have an Audit database where I need to display the amount of non
conformances raised. The non conformances are raised in a sub form linked to
the main form. How can I get a "record count" of the sub form into the main
form?
 
I have an Audit database where I need to display the amount of non
conformances raised. The non conformances are raised in a sub form linked to
the main form. How can I get a "record count" of the sub form into the main
form?

Put a textbox on the subform Footer (in design view, if you're using a
datasheet subform); call it txtTotal, say. Set its Control Source to

=Count(*)

On the mainform, put a second textbox with a control source

=subformname.Form!txtTotal

using the Name property of the subform control (which might or might
not be the same as the name of the form within that control).

John W. Vinson[MVP]
 
Back
Top