Troubleshooting Percentage Criteria in a Query

Hi Everyone,

I have a table field called Confidence Level has the following characteristics:  
Date Type:  Number
Field Size:  Double
Format:  Percent
Decimal Places:  0

It has been pull into a query, upon which I want to apply a 80% or above criteria.  I typed in ">=0.8" into the criteria section, but it didn't work.  

Can anybody tell me why and how to fix it?  

Thanks,
Juju
JuJuChiaAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

DatabaseMX (Joe Anderson - Microsoft Access MVP)Database Architect / Systems AnalystCommented:
Can you post the SQL for the query?

mx
0
JuJuChiaAuthor Commented:
Yes, DatabaseMX, here it is.  

SELECT [Annual Forecast].ID, [Annual Forecast].DISTI, [Annual Forecast].[PART NUMBER], [Annual Forecast].MANU_PART, [Annual Forecast].CUSTOMER, [Annual Forecast].APPLICATION, [Annual Forecast].[QUOTE #], [Annual Forecast].[QUOTE PRICE], [Annual Forecast].SumOfQty, [Annual Forecast].[AvgOfSales Price], [Annual Forecast].[DISTI COST], [Annual Forecast].[PROD DATE], [Annual Forecast].[DESIGN STATUS], [Annual Forecast].[CONFIDENCE LEVEL], IIf([PROD DATE] Between Format(([Year]-1) Mod 100,'00') & 'Q2' And Format([Year] Mod 100,'00') & 'Q1',Int([EAU]/12)) AS Jan, [Jan] AS Feb, [Jan] AS Mar, IIf([PROD DATE] Between Format(([Year]-1) Mod 100,'00') & 'Q3' And Format([Year] Mod 100,'00') & 'Q2',Int([EAU]/12)) AS Apr, [Apr] AS May, [Apr] AS Jun, IIf([PROD DATE] Between Format(([Year]-1) Mod 100,'00') & 'Q4' And Format([Year] Mod 100,'00') & 'Q3',Int([EAU]/12)) AS Jul, [Jul] AS Aug, [Jul] AS Sep, IIf([PROD DATE] Between Format([Year] Mod 100,'00') & 'Q1' And Format([Year] Mod 100,'00') & 'Q4',Int([EAU]/12)) AS Oct, [Oct] AS Nov, [Oct] AS [Dec]
FROM [Annual Forecast]
WHERE ((([Annual Forecast].[PROD DATE]) Between Format(([Year]-1) Mod 100,'00') & 'Q2' And Format([Year] Mod 100,'00') & 'Q4') AND (([Annual Forecast].[DESIGN STATUS])="design win") AND (([Annual Forecast].[CONFIDENCE LEVEL])>=0.8)) OR ((([Annual Forecast].[DESIGN STATUS])="design in"));
0
DatabaseMX (Joe Anderson - Microsoft Access MVP)Database Architect / Systems AnalystCommented:
ok ... you say the Data Type for [CONFIDENCE LEVEL] is Number.  What are some examples of actual data in that field ... not include how you have formatted it (PERCENT) ?

And why are you using Double if you have Decimal places set to 0 ?

mx
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
JuJuChiaAuthor Commented:
Hi MX,

There are only 4 different actual data in the Confidence Level:  20%, 50%, 80%, 100%.  I imported them directly from an Excel spreadsheet as it is.  

I am not sure why I am using Double, I am actually pretty new to Access.  

Thanks,
Julia
0
Hamed NasrRetired IT ProfessionalCommented:
"I am not sure why I am using Double"
Think of the values as decimal, .01, .9 This means use single, or double, or decimal

Looks like your query is ok, but try to simplify the query to select the only field with percent and analyze.
Ex:
SELECT tbl.p
FROM tbl
WHERE (((tbl.p)>=0.8));
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.