From: alekm on
Hi,
let's say I'm writing a code and I'm in the middle of event procedure for
check box. How do I check the current value of check box not reffering it by
name? Is there any other way than reffering it by its name. I want same code
to apply to several check boxes so I don't want to names fixed in code.
Thanx

alekmil
From: alekm on
I get it:
Screen.ActiveControl.value

"alekm" wrote:

> Hi,
> let's say I'm writing a code and I'm in the middle of event procedure for
> check box. How do I check the current value of check box not reffering it by
> name? Is there any other way than reffering it by its name. I want same code
> to apply to several check boxes so I don't want to names fixed in code.
> Thanx
>
> alekmil
From: Marshall Barton on
That will work in most situations, but there is no guanantee
that the active screen object is the form with the check
box.

You would be better off if you can find a way to use the
FORM's ActiveControl property.

If your common code is in a standard module, then passing
the form object or name to the common routine would be
better.
--
Marsh
MVP [MS Access]


alekm wrote:
>I get it:
>Screen.ActiveControl.value
>
>"alekm" wrote:
>> let's say I'm writing a code and I'm in the middle of event procedure for
>> check box. How do I check the current value of check box not reffering it by
>> name? Is there any other way than reffering it by its name. I want same code
>> to apply to several check boxes so I don't want to names fixed in code.

 | 
Pages: 1
Prev: stLinkCriteria
Next: Form size changing