Hide all empty fields in a report

  • Thread starter Thread starter Patti
  • Start date Start date
P

Patti

How do I hide all blank fields in a report yet still show the ones
containg information? The table it is linked to will only have one
record in it at any given time.

Patti
 
Try this in the forms "On Current" event
Me.fieldname.Visible = Not (Len(Me.fieldname.Value & "") = 0)

Jim
 
Patti said:
How do I hide all blank fields in a report yet still show the ones
containg information? The table it is linked to will only have one
record in it at any given time.

In the OnFormat event of the Detail Section of the report, use a bit of code
like:

If Len(Me.txtBoxName & vbNullString) = 0 Then
Me.txtBoxName.Visible = True
Else
Me.txtBoxName.Visible = False
End If
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads:
http://www.datastrat.com
http://www.mvps.org/access
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top