Parameter Query Criteria Syntax Issue

debbieR

New Member
Joined
Sep 2, 2017
Messages
8
Hi! This should be simple, but I'm an Access/Query newbie and can't figure out syntax to accomplish the following:
How would I change the criteria syntax to make it return ALL records with value >0 if they just click OK and don't enter a specific value?

PRICE SELL QTY (Parameter Query so it asks them for a value or they click OK to return all values) Current criteria used is:
Like "*" & [Enter QTY or Click OK to Display ALL ] & "*"

This works correctly EXCEPT I need to add "something" to the criteria code that it returns ALL records >0 as well as prompting for a value.
(it doesn't work to just put >0 unless I'm putting it in the wrong place)
Thank you!
 
Interesting....wonder why Microsoft showed both of them then? I literally copied that part directly from one of their samples on their help site. Oh well, learning something new every day!!!
 
Upvote 0

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).
I saw the data type problem too. Frankly still confused, since I've never used LIKE with numbers. I'd need to see some examples. But in Posts #6 and #10 and #11 the OP seems to be saying its working so I guess case closed. (Edit: also weird that now the forum now turns #6 into a link to something ... ) (Edit again: and now #6 is not a link to something hahaha).

wonder why Microsoft showed both of them then
Note: Also to answer this would need to see the example given.
 
Last edited:
Upvote 0
I think it's because it's treating # as an html paragraph tag. I've been going back to edit and removing the hyperlink.
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,185
Members
453,020
Latest member
Mohamed Magdi Tawfiq Emam

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