Reset an Option Button to False?

G

Guest

I'm trying to reset an option button back to false in Access 2003. I've tried
things like:

Me!optTitle.Value = False
optBlockTextTitle.Value = False
optBlockTextTitle = Null

These all result in:

Run-time error 2448: You can' assign a value to this object.

Any clues greatly appreciated!

Donald
 
F

fredg

I'm trying to reset an option button back to false in Access 2003. I've tried
things like:

Me!optTitle.Value = False
optBlockTextTitle.Value = False
optBlockTextTitle = Null

These all result in:

Run-time error 2448: You can' assign a value to this object.

Any clues greatly appreciated!

Donald
What do you mean by 'back to false'?
Do you mean remove any selected button value?

What's the name of the Option Group?
Is it "optTitle" or "optBlockTextTitle"?

Me![NameOfGroup] = Null
works for me.
 
G

Guest

I tried your code, and both your options worked

Does the option button is bounded to a field in a table?
It could be that you can't update this field
 
G

Guest

Thanks fredg & Ofer,

It's an unbound button, not part of a group. There it a case when the button
is selected (true) by the user, I need to change it back to false. I goofed
pasting in the code-it's only one button, should all be the same name.

Me!optTitle.Value = False
optTitle.Value = False
optTitle = Null
 
G

Guest

Thanks for confiirming the code works, I was going in circles with this. I
moved it to a different place in the code and it works now (?).
 

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