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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

access reports based on a query

Status
Not open for further replies.

TM2

Programmer
Jun 8, 2000
12
0
0
CA
Visit site
Hi,<br>I am creating a report based on information on a table named items.&nbsp;&nbsp;The table has two attributes for the value of an item.&nbsp;&nbsp;In the report I would like to show one attribute if the other attribute is null, can I do this??&nbsp;&nbsp;I don't want both to show up on the report.<br>Thanks,<br>Terri
 
Yes, create a query based on your table.<br>Put the following in the &quot;Field&quot; Row in a new column:<br><br>Attribute: IIf(IsNull([<font color=red>Attribute1]</font>),[<font color=blue>Attribute2</font>],[<font color=red>Attribute1</font>])<br><br>Save the query as whatever you want.<br>Create a report based on the query.<br>Now you can use the Attribute field, as a field on your report.<br><br>Obviously, you would include any other fields in your query besides the calculated Attribute field, and also change the names of the <font color=red>Attribute1</font> and <font color=blue>Attribute2</font> Fields to the appropriate fields. <p>Jim Lunde<br><a href=mailto:compugeeks@hotmail.com>compugeeks@hotmail.com</a><br><a href= Application Development
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top