>I have aready done this, but this is not my problem. Here is what I need: I open my form. Initial code runs to select the proper option button. At this time to view report button can be selected or the option can be changed by the user and then the view report button can be clicked. Now without writing code for each option button and a variable to hold the caption value, how can i analize the optiongroup to find the caption value of selected option?
Hope this is what you are looking for:
with thisform.optGroup
lcOption = ".Option"+alltrim(str(.value))+".caption"
lcCaption = &lcOption
endwith
Ofcause it only works if all the option names in the option group is called "OptionX", where X is the index in the option group.
HTH,
- Erik Niese-Petersen
Crazy Dane in USA.