Runtime error 2427

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
 
M

MacDermott

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top