Text Box Labels

Lily

Registered User.
Local time
Today, 08:04
Joined
Oct 1, 2000
Messages
42
Hello,

I have a notes field on a report that only has information for certain records. Is there a way to hide the label "Notes" if the corresponding text box is empty or null. Thank you very much for your help, it is much appreciated.
 
Replace the Label with a textBox. In the ControlSource write:
iif(isNull(RemarkTextBoxName),"",RemarkTextBoxName)
 
If (IsNull(Me.TxtBoxName)) Then
Me.Notes.Visible = False
Else
Me.Notes.Visible=False
End If
Make sure your text box name is not called notes.
HTH
 
Thank you both for your help. However, I tried both ways and couldn't get it to work (my lack of skill at this...). I did delete the label "Notes" and added an unbound text box and deleted the label to that. The text box, name comes up as "Text105", the control source field comes up blank. Do I enter the code under the control source of "Text105" text box or the "Notes" text box (which has the actual data)? Or do I select anything from the drop down menu there or go straight to the ... button (expression builder) for Text105? I did try both ways and one gives me a #error and one gives me the first few characters of the actual "notes" field. Thanks so much for your help, and I apologize as I know it's something I'm doing wrong. Thank you both again.
 
Ok your field is called notes add a label to it set caption to notes name it Label1 in the on format event for the detail section select event procedure open the module and add the following.
If (IsNull(Me.Notes)) Then
Me.Label1.Visible = False
Else
Me.Label1.Visible=True
End If
remember to compile and save.
HTH
 
Richie, I will give it a try, and I thank you again for your help. It is much appreciated.
 

Users who are viewing this thread

Back
Top Bottom