AfterUpdate, Lost Focus????????

  • Thread starter Thread starter Gareth
  • Start date Start date
G

Gareth

I have the following problem:

A form has 15 controls (text boxes), users are not supposed to enter data in
control2 unless there is an entry in control1

This goes on until control 15, users are not supposed to enter data in this
control unless the previous 14 controls have data in.

I cannot figure out how to achieve this, I have tried it in the afterupdate
event but get the following problem:

User enters data in control2 and control1 is empty. User does not press
return but instead clicks the forms Close button, a message pops up telling
him that control1 needs data in - he clicks OK and then form closes. Is
there any way to have the form stay open after the user has been told that a
further entry is required?

Can the message go in any other event?

Any suggestions gratefully received.
 
Hi,

Make the validations in the BeforeUpdate event of the FORM since it is
at that moment that record would be "ready" to be saved, meaning no more
input is expected for that record. Before CLOSING the form, or moving away
into another record, a dirty record is to be saved, so, your scenario is
also cover.

Hoping it may help,
Vanderghast, Access MVP
 
Back
Top