Jumat, 27 Mei 2011

RE: [MS_AccessPros] get control name associated with label

 

Pam-

Don't put the Click event procedure in the label - put it in the associated text
box. If the user clicks the associated label, the click event for the text box
fires!

John Viescas, author
Microsoft Office Access 2010 Inside Out
Microsoft Office Access 2007 Inside Out
Building Microsoft Access Applications
Microsoft Office Access 2003 Inside Out
SQL Queries for Mere Mortals
http://www.viescas.com/
(Paris, France)

-----Original Message-----
From: MS_Access_Professionals@yahoogroups.com
[mailto:MS_Access_Professionals@yahoogroups.com] On Behalf Of Pamela Zimmerman
Sent: Friday, May 27, 2011 6:16 PM
To: MS_Access_Professionals@yahoogroups.com
Subject: [MS_AccessPros] get control name associated with label

Can anyone one tell me how I can reference a control associated with a
label?

Given the form has a label called lblPodNumber and a field called
txtPodNumber

I have this:

Private Sub lblPodNumber_Click()

Call thisOrder(ActiveControl.Name, Screen.ActiveForm)

End Sub

I need to reference the name of the control that the label is associated
with, not the active control. How can I do that?

If possible, I would prefer not to use the actual label name (lblPodNumber),
as I would like to keep this as reusable as possible.

Suggestions appreciated!

Pam

[Non-text portions of this message have been removed]

------------------------------------

Yahoo! Groups Links

__._,_.___
Recent Activity:
.

__,_._,___

Tidak ada komentar:

Posting Komentar