Control

Powers143
09-01-2003, 07:27 PM
ok i have dynamic contols created on differente forms and is there a meathod of finding out on events (_click,_Change) where the control is located?

I can't use the .tag property since it is not an object, and i need to pass the form as a varible.

ex:

dyxTxt_click(fname as form)

fname.command1.caption = "help"

end sub

thanks

-doug

alp0001
09-01-2003, 07:46 PM
Sample syntax for click events:

Private Sub Command1_Click(Index As Integer)
'code
End Sub

Notice no parameter for forms on this event (or others). How are you creating the dynamic controls? Also, you could set the tag property to the form's name if thats what you want.

phinds
09-01-2003, 07:47 PM
the event handler for a control has to be put in the code module for the form that contains the control, so your "problem" doesn't exist as far as I can tell.

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum