Report with a Function

G

Guest

Hello!

I am creating a report in Access. The report contains membership
information such as name, address, email, etc. There are some members who do
not want their emails on the reports so I need to create an expression that
says "if publishemail=no then don't print email".

The syntax of the expression I'm using is this:
=IIf([Members]![Publish_EMail]=0,[Email_Address],"")

The results of this expression are "#Error" on the report. Can anyone help
me clear this up?

Thanks!!

Sandy
 
D

Duane Hookom

Try:
=IIf([Publish_EMail]=0,[Email_Address],Null)

Then change the name of the control from Email_Address to txtEmail.
 
F

fredg

Hello!

I am creating a report in Access. The report contains membership
information such as name, address, email, etc. There are some members who do
not want their emails on the reports so I need to create an expression that
says "if publishemail=no then don't print email".

The syntax of the expression I'm using is this:
=IIf([Members]![Publish_EMail]=0,[Email_Address],"")

The results of this expression are "#Error" on the report. Can anyone help
me clear this up?

Thanks!!

Sandy

You don't want it to print if the value is 0?

=IIf([Publish_EMail]=0,"",[Email_Address])

Make sure the name of this control is not [Publish_Email] nor
[Email_Address].
 

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