Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Automatic Update on Forms

Status
Not open for further replies.

sandellma

Programmer
Jun 5, 2003
2
GB

Hi,

I am trying to display a message when a user is about to update a field within a form in ms access (2000 and 97) and moving to the next record, the warning will need to be able to either stop the update or allow the update to proceed.

Any suggestions would be greatly appreciated.

Thanks in advance.

Michael ... please reply to sandell@flashmail.com as well as this posting.
 

This is a simple example using the beforeupdate event on a textbox which can be cancelled.

Code:
Private Sub textbox_BeforeUpdate (Cancel As Integer)

  If Msgbox ("Do you want to save the data", vbQuestion+vbYesNo) = vbNo Then
     Cancel = True
  End If

End Sub

John
 
Sorry - the End Sub should also be part of the code segment.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top