Question : Prompt user to verify data message when user hits add record button in access

I already have a form built in MS Access 97 within this form is an "Add Transaction" button.  When the user hits this button it updates a table with the supplied data.  I would like to add a meesage to this button, so that when the user hits it, it asks "Are you sure this data is accurate".  With in this Prompt would be 2 choices "Yes" and "Cancel".  If the user hits "Yes" then all process are completed but if the user hits "Cancel" then it cancels all actions and brings them back to the input screen.

Answer : Prompt user to verify data message when user hits add record button in access

x
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
Private Sub Add_Transaction_Click()
On Error GoTo Err_Add_Transaction_Click

if  (msgbox("Are you sure this data is accurate",vbokcancel))=vbok then
   'save record here
   docmd.gotorecord,,acnewrec
   else
   exit sub
end if


Exit_Add_Transaction_Click:
    Exit Sub

Err_Add_Transaction_Click:
    MsgBox Err.Description
    Resume Exit_Add_Transaction_Click
   
End Sub
Random Solutions  
 
programming4us programming4us