Prohibit record navigation

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
 
J

John Vinson

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]
 
J

John

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
 
J

John Vinson

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]
 

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