M
Maran
I wrote the below code, in the before update event in an option group. The
name of the option group is Meetings.
The after update , event group has macro, which will open a new form where
the user can update data. I want to restrict, the user from clicking the form
unnecessarily, because,
It will cause, the autonumber to generate, even if the user clicks it
wrongly, because, I have given, in the macro gotorecord as , , New,
Private Sub MEETINGS_BeforeUpdate(Cancel As Integer)
Dim MSG As String
MSG = MsgBox("YOU ARE TRYING TO CHANGE THE DATABASE!!", vbOKCancel)
If MSG = 1 Then
Dim MSG1 As String
MSG1 = MsgBox("MAKE SURE YOU HAVE UPDATE THE COMPANY NAME", vbOKCancel)
If MSG1 = 1 Then
Dim stDocName As String
stDocName = "HOLD_MEETINGS.DIF_MEET"
DoCmd.RunMacro stDocName
Else
Undo
Else
Undo
End If
End If
End Sub
name of the option group is Meetings.
The after update , event group has macro, which will open a new form where
the user can update data. I want to restrict, the user from clicking the form
unnecessarily, because,
It will cause, the autonumber to generate, even if the user clicks it
wrongly, because, I have given, in the macro gotorecord as , , New,
Private Sub MEETINGS_BeforeUpdate(Cancel As Integer)
Dim MSG As String
MSG = MsgBox("YOU ARE TRYING TO CHANGE THE DATABASE!!", vbOKCancel)
If MSG = 1 Then
Dim MSG1 As String
MSG1 = MsgBox("MAKE SURE YOU HAVE UPDATE THE COMPANY NAME", vbOKCancel)
If MSG1 = 1 Then
Dim stDocName As String
stDocName = "HOLD_MEETINGS.DIF_MEET"
DoCmd.RunMacro stDocName
Else
Undo
Else
Undo
End If
End If
End Sub