Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Locating Control on Form or Report 1

Status
Not open for further replies.
May 7, 1999
130
0
0
US
This should be an easy question to answer.

If I have "funny looking" code in VBA how can I find the control or controls which invoke the event? For example, I usually change the VBA-assigned event name to something meaningful by defining first the meaningful label or combo box name on a control and then creating the on-event that I want to use. However, there are times when I'm in a rush and just take whatever label or text box value the form assigns and create the event. Or, sometimes I have code attached to a label whose name I then change to something meaningful and I'm left with "orphan" code with a name like Label821_DblClick. I want not to remove this if there really is a Label821 object, but how do I determine if the object still exists? I would have thought that the object explorer would help me. But, I'm just not sure how to use all the debugging capabilities of Access. Could someone please offer some guidance?

Thanks,
John

John Harkins
 
I usually put a stop statement in the procedure and jack with the form.
 
There's a drop-down in the Format toolbar in Design mode on the form that shows all the control names on the form. If you find a funny name in code, check this drop-down to see if it still exists on the form, and if so, choose it from the list to select the actual control, I guess...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top