By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,831 Members | 1,031 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,831 IT Pros & Developers. It's quick & easy.

Hide/Remove null fields in Report

P: 111
I have a report that shows information for up to 5 passengers per booking. Not every booking has all 5 passengers in it, so i dont want those fields showing up on my report. How can i get rid of these?

I tried:

Expand|Select|Wrap|Line Numbers
  1. Private Sub Report_Open(Cancel As Integer)
  2. If IsNull([Pax2]) Then
  3.     Me.Pax2.Visible = False
  4.     Me.Grats2.Visible = False
  5.     Me.Air2.Visible = False
  6. End If
  7. 'repeat for pax 3, 4, and 5
  8. End Sub
...but that didnt work. it didnt hide them at all. I'd actually prefer to remove those fields if Null instead of just hiding them, because i dont want a ton of white space on the report either. Any thoughts?
Aug 28 '07 #1
Share this Question
Share on Google+
1 Reply

Expert 100+
P: 296
You might be better off adding criteria to your query that the report is based on: WHERE [field] Is Not Null
I don't know much VBA so I can't help you if that's the route you are wanting to go.
Aug 28 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.