Message Box Reminder on close or Before Update?

K

K. Boomer

I would like a message box to appear once the user has filled out the form
and wants to close it or move on to the next record.

It's a simple reminder message and does not require any input, nor does it
rely on data in any other field on the form.

"Verify calibration equipment has been added to database!" Then the form
closes after this appears.

Thanks in advance for your assistance.
 
D

Dirk Goldgar

K. Boomer said:
I would like a message box to appear once the user has filled out the form
and wants to close it or move on to the next record.

It's a simple reminder message and does not require any input, nor does it
rely on data in any other field on the form.

"Verify calibration equipment has been added to database!" Then the form
closes after this appears.


If the user doesn't have to confirm the update, it makes sense to put such a
message in the form's AfterUpdate event:

Private Sub Form_AfterUpdate()

MsgBox ""Verify calibration equipment has been added to database!"

End Sub

The message will be displayed any time a record is saved, regardless of
whether the save occurred because the user moved to a new record or because
they closed the form. It will not be displayed if nothing on the form was
modified (by the user or by your code) so that no record will be updated or
added.
 
P

Pendragon

In the On Close property of the form:

MsgBox "Verify calibration equipment has been added to database!", vbOKOnly
DoCmd.Close
 
B

boblarson

No, Pendragon - Dirk's response is correct. You can't put it in the form's
close event because the user may not close the form. They may just go on to
the next record. So, the form's After Update event makes sense for this.
--
Bob Larson
Access MVP
Free Tutorials and Samples at http://www.btabdevelopment.com

__________________________________
 
M

Mike Painter

If they have to do this I would think that the messasge should be placed in
the field(s) where the calabration is added and the form kept open until
then
 

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