Force Update of Subform Data

R

Renraf

I have a form with the following contents:
* "Start" and "Stop" time fields
* frmNavButtons subform with custom navigation buttons that include record
validation
* Interruptions subform in datasheet view with fields "Category" and "Minutes"

When they hit the button to navigate to a different record, it runs code
that validates that Stop - Start = Sum of minutes in interruptions subform

Here's the problem: Let's say you've entered the following in the
interruptions subform:
Meeting 30
Break 15

If your cursor is still in the box for "15" and you hit the navigation
button in the other subform, the 15 has not been saved, so it is not summed,
and the validation only sees 30 minutes in the subform. Then, AFTER you get
an error message, the 15 is updated, and you can navigate.

How do I force the form to update the database with the last entry ("15" in
this case) before my validation runs? (Not even sure how to refer to a
specific field/entry in a datasheet view)
 

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