I have a database with 4 separate forms. In one form I have a control that is an option group with 5 different options. I run the following code on the option group:
Private Sub A5_Click()
If Me.A5.Value = 8 Then
Me.A5a.Visible = True
Else
Me.A5a.Visible = False
End If
If Me.A5.Value = 9 Then
Dim Response As Integer
Response = MsgBox("This will clear the text box as well. Do you want to continue?", vbYesNo + vbCritical + vbDefaultButton2, "Clear values?")
If Response = vbYes Then
Me.A5a.Value = Null
Me.A5a.Visible = False
Else
Me.A5.Value = 8
Me.A5a.Visible = True
End
End If
End If
End Sub
When I run the code in Access 2003, the procedure works as stated. However, Access 2007 crashes as soon as I choose any option in the control. Any suggestions?
Private Sub A5_Click()
If Me.A5.Value = 8 Then
Me.A5a.Visible = True
Else
Me.A5a.Visible = False
End If
If Me.A5.Value = 9 Then
Dim Response As Integer
Response = MsgBox("This will clear the text box as well. Do you want to continue?", vbYesNo + vbCritical + vbDefaultButton2, "Clear values?")
If Response = vbYes Then
Me.A5a.Value = Null
Me.A5a.Visible = False
Else
Me.A5.Value = 8
Me.A5a.Visible = True
End
End If
End If
End Sub
When I run the code in Access 2003, the procedure works as stated. However, Access 2007 crashes as soon as I choose any option in the control. Any suggestions?