Hi
I think what you mean is you want 'Type Your Name Here' inside the text box label 'Name' ??? or similar
(I'm not going to forgive myself for this!) I've got something like this working by making the TextBox Background Style = Transparent and placing a Label behind it with the required text. The label must be exactly the same size as your TextBox. The After_Update event on the text box is;
- Private Sub Text13_AfterUpdate()
-
If Me.Text13 <> "" Then
-
Me.Text13.BackStyle = 1
-
Else
-
Me.Text13.BackStyle = 0
-
End If
-
End Sub
-
so the label is visible until there is data in the text box, then the BackStyle is changed to Normal (1) to hide the label.
You would have to do this for every field on your form, then you would have to copy and paste all of these bits of code into a new Sub, lets call it DisplayHelp, which you would need to call in the On_Current event of the Form, so that it would reset for each record. I suppose you could have the Label backcolour different to the TextBox then it would highlight what was Data and what was Help text. Different Fonts might help too (It sound like this is growing on me!)
If you really liked the effect you could probably wrap it up in a Public module.
-
-
Sub DisplayHelp(Fname As Form)
-
Dim frm As Form
-
Dim ctl As Control
-
-
Set frm = Fname
-
-
For Each ctl In frm.Section(acDetail).Controls
-
With ctl
-
Select Case .ControlType
-
Case acComboBox
-
If .Value <> "" Then
-
.BackStyle =1
-
Else
-
.BackStyle =0
-
EndIf
-
-
-
Case acTextBox
-
If .Value <> "" Then
-
.BackStyle =1
-
Else
-
.BackStyle =0
-
EndIf
-
End Select
-
End With
-
Next ctl
-
-
End Sub
-
-
You would call it by putting
in all the after_updates and On_Currents where needed
I HAVE NOT TESTED this and it may need polishing a bit but should give you the idea.
Best of luck
S7