Runtime error 2427

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello,
I have MS Access2K.
On the form I created a button named "Preview" when I click it I got an
error: "Run-time error '2427'
You entered an expression that have no value "
Here my piece of code.
Private Sub CmdPrev_Click()
If Me!Opt1.Value = 1 Then
MsgBox "Please select Form type"
End If
End Sub

Thank you inadvange,
MN
 
This is a guess, but it looks as if you may have an option group on your
page, with a radio button in it named Opt1.
In Access, the radio buttons within an option group don't have values
themselves, but the option group itself has a value, which is equal to the
OptionValue property of the selected radio button.

You can find the name of the option group by clicking on the line
surrounding the option buttons and displaying Properties.

HTH
 
Back
Top