ghudson
Registered User.
- Local time
- Today, 17:03
- Joined
- Jun 8, 2002
- Messages
- 6,194
Is it possible to set the ControlTip Text for each text box to the value of that text box with a function in the forms OnCurrent event for all text boxes? I know I could do it individually for each text box but there are too many and I any trying to do it within one function for the current record.
This is what I am trying to avoid...
This is what I am trying to do without success...
How can I cycle through all text boxes and set the controltip text for each text box with one function in the forms OnCurrent event?
I am also trying to copy the controls value to the clipboard but that part will be easy once I get the controltip text piece working.
Thanks in advance for your help!
This is what I am trying to avoid...
Code:
Me.TextBox1.ControlTipText = Me.TextBox1
This is what I am trying to do without success...
Code:
Private Sub Form_Current()
Dim ctl As Control
For Each ctl In Forms(Me.Name)
Case Is = acTextBox
ctl.ControlTipText = ctl.Value
ctl.SetFocus
DoCmd.RunCommand acCmdCopy
Case Is = acCheckBox
'do nothing
Case Is = acComboBox
'do nothing
Case Is = acListBox
'do nothing
Case Is = acOptionGroup
'do nothing
Case Else
'do nothing for the other controls
End Select
Next ctl
End Sub
I am also trying to copy the controls value to the clipboard but that part will be easy once I get the controltip text piece working.
Thanks in advance for your help!