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

IF NULL - THEN N/A

Status
Not open for further replies.

tpearo

Technical User
Apr 24, 2000
124
US
Is it possible to have a field automatically place N/A in it if the field is blank?

I have a report based on a query of a table of data. Some records do not have data for all fields which means in my case the data is Non Applicable (N/A).

I would like on my report instead of just leaving the space blank for it to be filled in with N/A.

Is this possible, and if so does anyone know how to do this.

Your help is appreciated in advance.

Tp
 
SELECT IIF(IsNull([yourfield]), 'N/A', [yourfield])
 
You could use Nz([FieldName],"N/A") where "N/A" is the value returned if [FieldName) is null
 
If the field is numeric then I would not do anything with creating expressions with Nz() or IIf() or ...

The Format property of text boxes have functionality for displaying almost anything for Null values.

Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
We have the same problem in a report. Where do we put the SELECT Statement???
 
Do you we put this in the report field criteria or the query field criteria???
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top