Form won't calculate fields

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

Guest

Hello,
I have a form in which I try to Count the records and Sum the Invoice
amount. Neither seem to work. Any ideas? The form was converted from
Access 97 to Access 2000.
Thanks,
Melinda
 
Your form has a subform?

If so, use a RecordsetClone for the recordsource of the subform to do this
operation. You can do both with the RecordsetClone. Do it from the main form
OR in the AfterUpdate of the subform.

--
Troy

Troy Munford
Development Operations Manager
FMS, Inc.
www.fmsinc.com


Hello,
I have a form in which I try to Count the records and Sum the Invoice
amount. Neither seem to work. Any ideas? The form was converted from
Access 97 to Access 2000.
Thanks,
Melinda
 
Thanks Troy,
Yes, I have a subform, which is where all of the calculations are going on.
I think that the RecordsetClone operation would be most effective on the
subform's AfterUpdate event. However, I'm not much a VB programmer. I
looked up RecordsetClone on the MSDN site. I see how one counts records, but
how do I get them to display in my field? It looks like I can use

Forms!frmSub.RecordsetClone.RecordCount _

to count them.

Also, how to I sum just one field?

Dim rst As Recordset
Set rst=Me.RecordsetClone
Sum(rst.TotalInvoice)

Again, how do I get it to display in my Access field on my form?
 
Back
Top