Event Function Procedure Call Sintax

D

dhendrickson

I have a form with many many toggle buttons (200+). Each
toggle button needs to have an event run the same
function procedure. The argument for the function
procedure is the toggle button. A typical call would look
like:

On Mouse Move....... =MouseMoveText([tglH11-5])

The call as written works fine. But now I have to insert
this for each toggle button and change the argument to
reflect the associated toggle. My 200+ toggles make this
a tedious task.

Is there a sintax for the argument that will refer to the
control the event belongs to? I know you can pass a
reference to the form with the sintax [form] and not need
to specify which form. Anything like this at the control
level?

If so, I can select all of the toggle buttons and paste
the same function call at once.

Thanks.
 
D

david epsom dot com dot au

reference to the form with the sintax [form] and not need
to specify which form. Anything like this at the control


Yes, i think it's [control] I don't have it here in
front of me, but I have used it.

But I have also heard of problems (not personally
experienced) where Access wants the parameters of the
event function to match the parameters of the default
event function, ie (CANCEL as integer) or whatever.

if you can't get it to work, you may be able to use
ActiveControl instead - i don't know what the active
control is for a toggle button, but it works ok for
some of my hundreds of ungrouped radio buttons.

(david)


dhendrickson said:
I have a form with many many toggle buttons (200+). Each
toggle button needs to have an event run the same
function procedure. The argument for the function
procedure is the toggle button. A typical call would look
like:

On Mouse Move....... =MouseMoveText([tglH11-5])

The call as written works fine. But now I have to insert
this for each toggle button and change the argument to
reflect the associated toggle. My 200+ toggles make this
a tedious task.

Is there a sintax for the argument that will refer to the
control the event belongs to? I know you can pass a
reference to the form with the sintax [form] and not need
to specify which form. Anything like this at the control
level?

If so, I can select all of the toggle buttons and paste
the same function call at once.

Thanks.
 
D

dhendrickson

David,

Thanks,

The [control] did not work, but [ActiveControl] did. This
will make things much easier for my task at hand and a
great tool for future use.

Daen
-----Original Message-----
reference to the form with the sintax [form] and not need
to specify which form. Anything like this at the
control


Yes, i think it's [control] I don't have it here in
front of me, but I have used it.

But I have also heard of problems (not personally
experienced) where Access wants the parameters of the
event function to match the parameters of the default
event function, ie (CANCEL as integer) or whatever.

if you can't get it to work, you may be able to use
ActiveControl instead - i don't know what the active
control is for a toggle button, but it works ok for
some of my hundreds of ungrouped radio buttons.

(david)


I have a form with many many toggle buttons (200+). Each
toggle button needs to have an event run the same
function procedure. The argument for the function
procedure is the toggle button. A typical call would look
like:

On Mouse Move....... =MouseMoveText([tglH11-5])

The call as written works fine. But now I have to insert
this for each toggle button and change the argument to
reflect the associated toggle. My 200+ toggles make this
a tedious task.

Is there a sintax for the argument that will refer to the
control the event belongs to? I know you can pass a
reference to the form with the sintax [form] and not need
to specify which form. Anything like this at the control
level?

If so, I can select all of the toggle buttons and paste
the same function call at once.

Thanks.


.
 

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