A
Aaron Howe
I'm trying to get up a very simple message box assigned to
a click action on a button, which will run a msgbox
function giving a warning with an OK and a Cancel button.
Private Sub Command19_Click()
MsgBox "Are you sure you have entered the details
correctly?" & Chr(13) _
& "Once you click OK, you cannot edit this section
again without restarting", vbOKCancel + vbExclamation
If vbOK Then
Me.cboCltName.Locked = True
Me.cboAgName.Locked = True
Me.txtInvNum.Locked = True
Me.txtPONum.Locked = True
Me.txtWkEnd.Locked = True
ElseIf vbCancel Then
End If
End Sub
It works, but it works regardless of whether OK or Cancel
is clicked: either way the fields are locked. I never
seem to have this problem with Excel, Access seems to
treat these things differently...! Can anyone point me in
the right direction?
a click action on a button, which will run a msgbox
function giving a warning with an OK and a Cancel button.
Private Sub Command19_Click()
MsgBox "Are you sure you have entered the details
correctly?" & Chr(13) _
& "Once you click OK, you cannot edit this section
again without restarting", vbOKCancel + vbExclamation
If vbOK Then
Me.cboCltName.Locked = True
Me.cboAgName.Locked = True
Me.txtInvNum.Locked = True
Me.txtPONum.Locked = True
Me.txtWkEnd.Locked = True
ElseIf vbCancel Then
End If
End Sub
It works, but it works regardless of whether OK or Cancel
is clicked: either way the fields are locked. I never
seem to have this problem with Excel, Access seems to
treat these things differently...! Can anyone point me in
the right direction?