Skip Field Value

G

Garry Jones

I have a database in Access that I want to link to a Word document for
printing. I do not want the fields that are empty to take up any room at
all on the word document. Its all changed since office 97 (I am now on
Office 2003) and I just cant find a way to skip field if empty. The
nearest I can get is skip entire record if field is empty, but thats not
what I want.

ie

The record has three fields

If these values are "Shirt" "Blue" "Cotton"

It should print

Shirt
Blue
Cotton

But if the three values are

"Skirt" "NULL" "Leather"

It should print

Skirt
Leather

(ie not leave an empty row in the color field).


Garry Jones
Sweden
 
K

KARL DEWEY

One solution is to build a query and concatenate those fields with IIF
statements. Then use the concatenate field instead of the three separate
fields.

Like this for names when there is no middle initial --
Name: [LName] & ", " & [fname] & IIf([mi] Is Null,Null," " & [mi]) &
IIf([suffix] Is Null,Null," " & [suffix])
 
Top