Hey guys, unfortunately my vba knowledge is very limited right now....
I have a form with 2 option buttons and a button.
If option1 button is clicked on and the form button is clicked the form opened is cars2.
If the option2 button is clicked and the form button is clicked, the form cars 3 will open. Below is my code which I have attempted but its not compiling properly:
Private Sub Command10_Click()
If option1.Enabled = True Then
DoCmd.OpenForm "cars2"
Else
If option2.Enabled = True Then
DoCmd.OpenForm "cars3"
End If
End If
End Sub
Does anyone know where I am going wrong, or better still, know how to do this?
Kind regards
George
I have a form with 2 option buttons and a button.
If option1 button is clicked on and the form button is clicked the form opened is cars2.
If the option2 button is clicked and the form button is clicked, the form cars 3 will open. Below is my code which I have attempted but its not compiling properly:
Private Sub Command10_Click()
If option1.Enabled = True Then
DoCmd.OpenForm "cars2"
Else
If option2.Enabled = True Then
DoCmd.OpenForm "cars3"
End If
End If
End Sub
Does anyone know where I am going wrong, or better still, know how to do this?
Kind regards
George