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

Report - changing a Y/N to a text answer in the report 1

Status
Not open for further replies.

molly

Technical User
Jul 17, 2000
219
US
In my Report, I have a text box called LETTER SENT.
The underlying value comes from a table where the field is a Y/N field.

I currently get 1 or -1 as the answer. which is correct.

But instead of seeing a 1 or -1 in the report, i would like to see the words No and Yes to describe the status. I tried using an IIF statement in the report field Letter Sent, control source. but the report just showed #Error.

the report field Control Source is:

=IIf([Letter Sent]=-1,"YES","No")

ideas? thanks
 
Are you saying IIF(Letter sent ...) inside a text box named Letter Sent?

Change the name of the text box.

Lilliabeth
-Why use a big word when a diminutive one will do?-
 

See VB help for "Format Property - Yes/No Data Type".

TomCologne
 
molly,
Yeah that would be my read, you have two items with the same name a TextBox and a recordset field and it confuses Access, my one complaint about the drag-n-drop control creation is that the control has the same name as the field.

molly said:
I currently get 1 or -1 as the answer. which is correct.
Did you set it up this way? Usually [tt]False[/tt] is 0 (zero) and anything else is [tt]True[/tt]. With this structure you could change the formatting of a TextBox to "[tt]Yes/No[/tt]" and Access should take care of this for you.

You didn't offer a penny but...
CMP

[small]For the best results do what I'm thinking, not what I'm saying.[/small]
(GMT-07:00) Mountain Time (US & Canada)
 
Lilliabeth - you are correct. i did not type in the correct field name. it now works. i should have had:

=IIf([Printed SoldtoID-FormulaID]=-1,"YES","No")

sorry for the goose chase.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top