Prohibit record navigation

  • Thread starter Thread starter John
  • Start date Start date
J

John

Hi

I need to block user from moving away from a record using any of
First/Last/Prev/Next/New Record or any other way IF the record has not been
saved, and displaying a message to the effect "Please finish editing". If
however the user has explicitly saved the record using save from the access
menu then allow to move from record. How do I achieve this via code?

Thanks

Regards
 
Hi

I need to block user from moving away from a record using any of
First/Last/Prev/Next/New Record or any other way IF the record has not been
saved, and displaying a message to the effect "Please finish editing". If
however the user has explicitly saved the record using save from the access
menu then allow to move from record. How do I achieve this via code?

Set Cancel to True in the Form's BeforeUpdate event until you're
satisfied.

John W. Vinson[MVP]
 
Is there a way to distinguish between a) before update event due to explicit
save action from access menu and b) before update by other reasons such as
moving away from the record?

Thanks

Regards
 
Is there a way to distinguish between a) before update event due to explicit
save action from access menu and b) before update by other reasons such as
moving away from the record?

Not that I know of. The BeforeUpdate event fires upon any action which
causes the record to be saved to disk - navigating off the record,
closing the form, Records... Save, whatever. Why?

John W. Vinson[MVP]
 
Back
Top