Conditional Printing

E

eastlaketech

I am creating a Directory for a school. A small number of families do not
want their address or phone number in the directory (the student name,
teacher and parents would still print).

I tried adding the following calculation to the control source, but now the
report is asking for FAMILY parameter values -- if none entered, I get an
error on the field.

Iif(FAMILY.Directory Address = "No", " " , FAMILY.Address)
 
S

Stefan Hoffmann

hi,
I tried adding the following calculation to the control source, but now the
report is asking for FAMILY parameter values -- if none entered, I get an
error on the field.
You only need the table name as prefix, when the fieldname are not
unique in your record source.
Iif(FAMILY.Directory Address = "No", " " , FAMILY.Address)
You also need square brackets, as you are using spaces in your field names.

Assuming that your field [Directory Address] is a boolean value:

Iif([Directory Address], " " , [Address])



mfG
--> stefan <--
 
T

tina

if FAMILY is the name of the table that the report is bound to, and
Directory Address and Address are the names of fields in the FAMILY table,
then try the following expression in the ControlSource of the textbox
control in the report, as

=IIf([Directory Address] = "No", "", [Address])

also, is Directory Address a "Yes/No" data type in the table (shows as a
checkbox in datasheet view)? if so, then change the sytax of the expression
to

=IIf([Directory Address] = False, "", [Address])

hth
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top