Hi All,
I have a select case statement and what I want do is, when the vbCancel is selected,
I want to go back to the subform control's original value.
any ideas?
Many thanks in advance.
Jim
Code:
Private Sub Command38_Click()
Dim ctl As Object
Cancel As Integer
Select Case MsgBox("Do you want to accept?", vbYesNoCancel + vbQuestion)
Case vbYes
DoCmd.RunCommand acCmdSaveRecord
MsgBox "Record was saved"
DoCmd.GoToRecord , , acNewRec
End If
Case vbNo
For Each ctl In Me.frmEndorsementSubform.Controls
If ctl.Tag = "Clear" Then
ctl = Null
End If
Next ctl
Case vbCancel
Cancel = True
Me.Form!frmEndorsementSubform.SetFocus
DoCmd.DoMenuItem acFormBar, acEditMenu, acUndo, , acMenuVer70
End Select
End sub
I have a select case statement and what I want do is, when the vbCancel is selected,
I want to go back to the subform control's original value.
any ideas?
Many thanks in advance.
Jim
Code:
Private Sub Command38_Click()
Dim ctl As Object
Cancel As Integer
Select Case MsgBox("Do you want to accept?", vbYesNoCancel + vbQuestion)
Case vbYes
DoCmd.RunCommand acCmdSaveRecord
MsgBox "Record was saved"
DoCmd.GoToRecord , , acNewRec
End If
Case vbNo
For Each ctl In Me.frmEndorsementSubform.Controls
If ctl.Tag = "Clear" Then
ctl = Null
End If
Next ctl
Case vbCancel
Cancel = True
Me.Form!frmEndorsementSubform.SetFocus
DoCmd.DoMenuItem acFormBar, acEditMenu, acUndo, , acMenuVer70
End Select
End sub