not able to understand wrong result by query

SKV

Active Member
Joined
Jan 7, 2009
Messages
257
I designed a query to display results in which the zip code (text format) is within a zipcode range in another table. for particular range (see below) I am getting wrong result.
Ex : zip code 60025 is coming between 6000 and 6099.
it is greater than equal to 6000 - OK
It is less than equal to 6099 - NO (but I am still getting this result)

Can you please help me find the issue. I defined all zipcodes as Text as some zipcodes are alphanumneric.
 

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
Do you realise how Access compares values?

I'm not sure if I can give a thorough explanation but if you are comparing text then it'll be regarded as text, not numbers.

So it will be sorted/filtered alphanumerically not numerically.

That's unless you convert to numbers, and there are plenty of conversion functions in Access.:)
 
Upvote 0

Forum statistics

Threads
1,214,895
Messages
6,122,128
Members
449,066
Latest member
Andyg666

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top