how do I assign a variable to a check box or radio control?

T

tlscorpadmin

I need to assign the value of a radio control or check box when clicked on to
a variable, preferably using the SetTemVar macro.
 
A

Allen Browne

Use the AfterUpdate of the control (if it's a stand-alone control), or of
the option group (if it's part of an option group) to SetValue (in a macro)
or assign the value (in code.)

Not sure if it's really a good idea though. Considerations such as:
- You can quite easily read the value from the form.
- Doesn't work in versions of Access before 2007.
- If it's a bound form, the tempvar would not be up to date when you move to
a different record.
 

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