Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Include values with no associated records?

Status
Not open for further replies.

slwolf8

Technical User
Apr 23, 2001
82
US
I have created a budgeting database for my boss. I have one table with purchasing information in it (invoice no, vendor, amt paid, etc) and in another table I have a list of categories (hardware, software, etc) and the alocated budget amount for that category. Some of the categories do not have any related purchases yet. My boss would like all of the purchases to show up in a report. I was able to do that just fine. However, no he wants to add the categories without any related purchases to the report as well. In other words, if hardware has no purchases, it should say "hardware: $0." To complicate matters, each category has several subcategories (hardware: network cards, routers, etc) that are located in a 3rd table. In the report purchases are broken down by category and then subcategory. If a subcategory has zero purchases that should be indicated. Any ideas on this??
 
Just add the field(s) you want on your report and then in the field property you can put an iif statement like this:

Code:
iif([hardware]<1, 0, [hardware])

Hope that helps.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top