PeregrinTook
Registered User.
- Local time
- Today, 04:44
- Joined
- Aug 1, 2006
- Messages
- 15
Hi all,
Just wondering if anyone knows if this is possible please - I can't find anything helpful on the net so any tips would be much appreciated...
I'm making a form which allows the creation of letter templates, with functionality for users to double click a query field name (from a list in a sidebar) and have that field name entered (in the format <BusinessAddress1>) on a master letter template form.
The list of available field names in the sidebar are all labels, and each currently has a DblClick event like this:
Where InsertFieldName is a function to enter the text string passed to it into the master letter template.
There are now many query fields available on each sidebar list, and the number of available queries (and therefore sidebar lists) is growing rapidly.
The above method was ok for each label when there were only a few, but the more I add the more sure I am there must be an easier and neater way!
So my question then is this.
Is there a form-level way to determine the name of the label that was double-clicked, then just pass that name straight into the InsertFieldName function - thus removing the need to hard-code a text string to pass for each individual label's DblClick event?
I hope I've given a clear enough picture of the problem, and any help is much appreciated I can assure you!
Many thanks
PT
Just wondering if anyone knows if this is possible please - I can't find anything helpful on the net so any tips would be much appreciated...
I'm making a form which allows the creation of letter templates, with functionality for users to double click a query field name (from a list in a sidebar) and have that field name entered (in the format <BusinessAddress1>) on a master letter template form.
The list of available field names in the sidebar are all labels, and each currently has a DblClick event like this:
Code:
Private Sub BusinessAddress1_DblClick(Cancel As Integer)
Call InsertFieldName("BusinessAddress1")
End Sub
Where InsertFieldName is a function to enter the text string passed to it into the master letter template.
There are now many query fields available on each sidebar list, and the number of available queries (and therefore sidebar lists) is growing rapidly.
The above method was ok for each label when there were only a few, but the more I add the more sure I am there must be an easier and neater way!
So my question then is this.
Is there a form-level way to determine the name of the label that was double-clicked, then just pass that name straight into the InsertFieldName function - thus removing the need to hard-code a text string to pass for each individual label's DblClick event?
I hope I've given a clear enough picture of the problem, and any help is much appreciated I can assure you!
Many thanks
PT