Question: Counting subform records on main form

P

Pattyt

Hi,
I have a very simple question, I think, related to counting subform records
on my main form.

I have a text box in the header of my subform that counts records. I also
added a second text box on my main form with its control source to the first
text box in my subform.

The text box in my main form updates automatically when I delete records in
my subform but when I add records I have to go over to the next record and
then come back in order for the text box to update.

Can anyone explain what's going on?
Thanks
 
P

Pete D.

When you delete a record your form does a requery as it must load a record
that exists. You must force the new record to requery which is what happens
when you change records. Search help for requery to get a more detailed
explanation.
 

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