Please help, simple radio button code wont work and I cant work out why

andyj2k1

New member
Local time
Today, 09:57
Joined
Feb 25, 2007
Messages
3
Hi folks. Ive got a simple bit of code saying..

Dim score As Integer
score = 0

If Option16.Value = 1 Then
score = score + 1
end if

But i keep geting an error message saying "you entered an expression that has no value"

Anyone got any ideas, this is really frustrating me now!
 
option

the option value = -1 for true and zero for false.

OOPs, I'm thinking of a checkbox. Sorry about that.
 
Last edited:
Hi,

It should be "Option16.OptionValue".

This control ("Option16.Value") does not work in VBA.

You can set the OptionValue to 1,2,3...etc.

HTH

Hi folks. Ive got a simple bit of code saying..
Dim score As Integer
score = 0
If Option16.Value = 1 Then
score = score + 1
end if
But i keep geting an error message saying "you entered an expression that has no value"
Anyone got any ideas, this is really frustrating me now!
 
Andy,
Where do you have that code? Is Option16 an OptionGroup control?
 
Thanks for the help guys, its just a option box (radio button) on a form. Still cant get it to work :(
 
Hi,

Then, "Option.Value" should work.

"you entered an expression that has no value"

The code you gave might not come from it. Is there something else in the code? In the VBA editor, where did the line stop?

Thanks for the help guys, its just a option box (radio button) on a form. Still cant get it to work :(
 

Users who are viewing this thread

Back
Top Bottom