Previous Thread

6/30/2006 12:00:02 AM    hide empty fields in a report
I just started using access two weeks ago and have created a dbase for my 
 
travel agency. 
 
Some bookings have 20 passengers some only have 1.  I have 20 fields (for 
 
passengers) in my table, but not all of them are filled for every booking. 
 
How can I run a report that shows only the records that have passenger data 
 
in them? 
 
Really appreciate any advice. 
 
P.S.  Allen Browne...You rock! Thanks for add calendar button on your 
 
website...Would have taken me another 12 months to figure that one out!



6/30/2006 3:14:58 PM    Re: hide empty fields in a report
One cruise/bus/whatever can have many passengers booked. That means you need 
 
2 tables: 
 
Booking table (one record for each cruise/bus/whatever): 
 
BookingID    AutoNumber 
 
BookingDate    Date/Time 
 
... 
 
BookingDetail table (one record for each passenger in a booking): 
 
BookingDetailID    AutoNumber 
 
BookingID              which booking this relates to 
 
Passenger 
 
... 
 
Ultimately, the interface is a main form for the Booking, with a subform for 
 
the passengers in the booking. 
 
For an example, open the Northwind sample database that installs with 
 
Access, and choose Relationshps on the Tools menu. You will see how one 
 
Order can have many Order Details (the line items associated with the 
 
order.) You need the same kind of approach to handle many passengers in one 
 
booking. 
 
Then open the Orders form in Northwind, to see how the line items work for 
 
the order. You will have a similar interface for the passengers in a 
 
booking. 
 
Once all that is sorted, out, the report will be based on a query that uses 
 
both tables (like Northwind's Invoices report.) The issue of empty fields 
 
just does not exist once the structure is correct. 
 
Feedback appreciated. 
 
-- 
 
Allen Browne - Microsoft MVP.  Perth, Western Australia. 
 
Tips for Access users - http://allenbrowne.com/tips.html 
 
Reply to group, rather than allenbrowne at mvps dot org. 
 
"TonganShark" <TonganShark@discussions.microsoft.com> wrote in message 
 
news:EF4BC33B-0419-4AA8-8230-0143E839C699@microsoft.com...