speakers_86
Registered User.
- Local time
- Today, 03:37
- Joined
- May 17, 2007
- Messages
- 1,919
I got this code, but the vbYes doesn't want to work. It keeps acting like I am saying vbNo. I got the format for working with message boxes from here. What doesn't make sense to me is that the link says to declare the variable as an integer, but I am storing string there. I tried setting LResponse = 6, but same result.
Code:
Private Sub Check152_AfterUpdate()
'Warn user before data is deleted.
If Me.Check152.Value = 0 Then
If IsNull(Me.TCL) Then
Else
Dim LResponse As Integer
LResponse = MsgBox("You will loose data if you click 'OK'.", vbOKCancel, "Continue?")
If LResponse = vbYes Then
Me.TCL.Value = Null
Me.TCL.Enabled = False
Me.TCR.Value = Null
Me.TCR.Enabled = False
Else
Me.Check152.Value = -1
End If
End If
Else
Me.TCL.Enabled = True
Me.TCR.Enabled = True
End If
'''''''''''''''''''''''''''''''''''''''''''''''''