Im working on a project in access and my partner and i are making a who wants to be a millionare kind of thing.
the problem is that we want to do an if statement involing an option button but we keep getting an error message saying
value not valid
i would like to hear what some of you people think some of the code we have tried is
if option1 = true then
if option1.value=1 then
if option1.checked=true then
we have the options in groups but still cant figure it out soem help would be nice thanks.

Recommended Answers

All 3 Replies

I think this is a problem of null value of sort. I will give a simple debugging technique which I have adviced to many on this forum. Now insert in your code the MsgBox like below.

if option1 = true then
msgbox "Option1 is true"
if option1.value=1 then
msgbox " and its value=1 now"
if option1.checked=true then
msgbox "option1 is checked"

Like wise you can find where you actually went wrong.
If still you can't make out, let me know the piece of code fully.

we have sent so long working on it that we just decided to use command boxes. It would be nice to figure this out tho.


Just check it with:

If Option1.Value =True Then


If Option1 Then


Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.