Programmatic creation of Option Group

R

Raj

Hi,
I need to create an option group based on a selection
(onclick of a button) in the form. The option group
options and labels (radio value and label) should come
from a query based on the button clickced.

Any help is greatly appreciated.

Thanks
Raj.
 
T

TC

You can not create a new control on a form, at runtime of that form. So your
only option is, to pre-create a suitable option group control, but make it
invisible at design time or from form_open etc. Then, when the button is
clicked, set the relevant properties of the pre-created control (eg.
controlsource, option captions etc.) then make it visible. You would have to
decide on the maximum number of option buttons to pre-create. You could not
add more options at runtime, just as you can not create the option group
itself at runtime.

HTH,
TC
 

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