Unbound control - Can I check for null on before update?

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

Guest

I have a form with multiple unbound controls for entering new employees.
It updates to multiple tables. I've tried several ways to check for a blank
field before sending it to the table, and it's just not working.

Is it even possible to check for nulls in an unbound text box on the before
update?

Thanks,
J
 
That's still not safe.

Although Exit fires even if nothing was typed, there is no guarantee the
user will ever click in that control, and if they don't, the Exit event
won't fire.

The simplest solution is to:
1. Open your table in design view.
2. Select the field.
3. In the lower pane, set its Required property to Yes.

If you want to give a warning but allow the user to override it, use the
BeforeUpdate event of the *form* (not control.) Access fires that event just
before writing the record to the table. Cancel the event if you are not
happy.
 
You're a genius. I didn't figure that would work because I knew they were
going to be unbound controls is why I didn't set that when I created the
tables.
Thank you.
 
Back
Top