ms access - option button value -1 when selected -
i have option button has control source. button not part of option group. when button not selected stores 0 (which want) however, when option button selected stores -1 instead of 1. cannot seem find property in menu set option value.
is there way set storage value when selected 1 not -1?
i tried me.controls("optionbuttoncontrolname").optionvalue = 1 got error.
i know do:
if (optbtn.value = -1) optbtn.value = 1 end if
each time button clicked there has easier way i'm not seeing.
thanks!
in access (and in vba in general recall) true value -1. option button (and other control boolean value setting in vb/vba) show value when true.
a less verbose option might grab absolute value of control:
myvalue = abs(optbtn.value)
Comments
Post a Comment