Avatar of SteveL13
SteveL13
Flag for United States of America asked on

How format result in a SQL query

I have this in a query design (SQL view) for a listbox:

Format(tblPrintOrdDistribution.PrintOrdDetailComplete) AS Complete

Which is fine.  The name of the column is "Complete" which is what I want.  But the result is showing -1 and I want it to be Yes or No.  

What do I do with the syntax to make that happen?

--Steve
Microsoft Access

Avatar of undefined
Last Comment
mbizup

8/22/2022 - Mon
Kyle Abrahams

is PrintOrdDetailComplete an integer?

can you do Format(case when PrintOrdDetailComplete = -1 then 'No' else 'Yes' end)  AS Complete
MrHswede

If possible use case when x = -1 then no else yes end as complete
ASKER CERTIFIED SOLUTION
Norie

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
mbizup

Nothing with the syntax...

- Select the column in the query designer
- Right-click and select "Properties"

You can set the format of your Boolean field to Y/N here.
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck
mbizup

Here's a screenshot from the query builder:

B