Microsoft
Software
Hardware
Network
Question : What is the right code on Form
I have a form that I want a msg box to pop up before the user adds the record to the table. If they are satisfied, the can hit "OK" and the record will be written to the table. If not, they can select "Cancel" and they will see the form with their data and be able to modifiy it as necessary.
I found this code on this site and modified the msg box to say what I want it to say. Everything works ok except for the "Cancel" Button.
here is the code I am usinig in the BeforeUpdate event:
Private Sub Form_BeforeUpdate(Cancel As Integer)
If (MsgBox("Please check to make sure you have entered data in each of the boxes", vbOKCancel, "DATA VERIFICATION") = vbCancel) Then
Cancel = True
AccSubCategory.Undo
End If
End Sub
When I hit "Cancel" I get a debug error which points me to the "AccSubCategory" line. I know nothing about coding, but know I need to replace "AccSubCategory" with are reference to my form? I have tried everything I can think of and nothing works. Any help on what I need to replace "AccSubCategory" with would be greatly appreciated.
Answer : What is the right code on Form
i disable the mousewheel, just enable it.
why do you want the codes in the beforeupdate event?
and why will you place it on the on load event?
leave the codes under the function DataCompleted, that will be your validation.
Random Solutions
Error 1332: No mapping between account names
Installing Windows 98 on a Dell Inspiron 1150 laptop freezes
MS Access Powerpoint VBA
Turn off Access 2007 Current Version Check
Publisher cannot be verified
Update Temp Recordset using VBA
Microsoft Outlook Delayed delivery option- Would like time stamp to show in sent items when email is actually sent and not when its activated
Argument not specified for parameter 'sender' of 'Protected Sub EmailRegAttendeeNotices_Cl<wbr />ick(sender<wbr /> As Object, e As System.EventArgs)'.
How to set a font to a CMenu ?
The string was not recognized as a valid DateTime. There is a unknown word starting at index 0.