I'm trying to prevent printing of a private phone number field based on a
field used to identify the number as "Public" or "Private". I seem to only
include record or bypass whole record....

Signature
Frank
Adam Clark - 21 Feb 2007 20:28 GMT
Is this in a report or on a form?
For a report us IIF, for a form use the VB If...Then... statement.
> I'm trying to prevent printing of a private phone number field based on a
> field used to identify the number as "Public" or "Private". I seem to
> only
> include record or bypass whole record....
fredg - 21 Feb 2007 20:35 GMT
> I'm trying to prevent printing of a private phone number field based on a
> field used to identify the number as "Public" or "Private". I seem to only
> include record or bypass whole record....
In an unbound text control:
=IIf([SomeField] = "Public",[PhoneNumber],"")
Make sure the name of this control is not the same as the name of any
field used in it's control source expression.

Signature
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail
'69 Camaro - 21 Feb 2007 20:47 GMT
Hi, Frank.
> I seem to only
> include record or bypass whole record....
This sounds like you're using a query, not a form or report to show
individual text boxes. It would be helpful to give enough information so
that folks answering your question don't have to guess the context of what
you're trying to do. If you are using a query, then try the following
example syntax in your query:
SELECT IIF(Nz(Status, "") = 'Public', tblMyTable.Phone, Null) AS Phone
FROM tblMyTable;
HTH.
Gunny
See http://www.QBuilt.com for all your database needs.
See http://www.Access.QBuilt.com for Microsoft Access tips and tutorials.
Blog: http://DataDevilDog.BlogSpot.com
http://www.Access.QBuilt.com/html/expert_contributors2.html for contact
info.
> I'm trying to prevent printing of a private phone number field based on a
> field used to identify the number as "Public" or "Private". I seem to
> only
> include record or bypass whole record....