count

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

Guest

I have an ubound field on a form in the form footer. I have =Count(*)
It works but only after I refresh is there a way to keep the count going as
I enter records into the form?
Thanks
Chey
 
I have an ubound field on a form in the form footer. I have =Count(*)
It works but only after I refresh is there a way to keep the count going as
I enter records into the form?
Thanks
Chey

Put into the Form's AfterUpdate event:

Private Sub Form_AfterUpdate()
Me.nameofyourtextbox.Requery
End Sub


John W. Vinson[MVP]
 
I tried what you suggested and it did not work. As of right now my unbound
field is Text20. So I put the code where? In the text20 After update or the
form after update? I tried experimenting a tried on change also.
Thanks for your time
Chey
 
Something else I noticed is the number does not change when I add records but
if I close out and come back in the number is correct. Then if I go to
delete the records the number will change. So now it doesent work when I add
but will when i delete.
Thanks
 
I tried what you suggested and it did not work. As of right now my unbound
field is Text20.

Rename it. You'll find that it's easier to understand your own
application if you use meaningful values.

What is this control's Control Source property? Is this a minform, or
a subform?
So I put the code where? In the text20 After update or the
form after update? I

As I said - in the Form's AfterUpdate. A calculated textbox's Change
or BeforeUpdate or AfterUpdate events will never fire - because those
events fire *WHEN THE USER* types something into that textbox (which
they have no reason to do with a calculated control).

John W. Vinson[MVP]
 
Back
Top