Home

Help with Query Criteria

%3CLINGO-SUB%20id%3D%22lingo-sub-306008%22%20slang%3D%22en-US%22%3EHelp%20with%20Query%20Criteria%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-306008%22%20slang%3D%22en-US%22%3E%3CP%3ESo%2C%20I%20have%20a%20value%20(text)%20in%20a%20form%2C%20that%20was%20generated%20from%20multiple%20selected%20list.%26nbsp%3B%20e.g.%20the%20text%20box%20says%2C%20'AB1'%20or%20'CD2'%20or%20'EF3'%26nbsp%3B%20%26nbsp%3B%3C%2FP%3E%3CP%3EI%20want%20to%20pass%20this%20value%20(%3CSPAN%3E'AB1'%20or%20'CD2'%20or%20'EF3')%20to%20a%20query%20field%20(e.g.%20customer).%26nbsp%3B%20Well%2C%20I%20can%20see%20that%20the%20text%20can%20come%20over%2C%20but%20it%20is%20not%20behaving%20in%20the%20criteria%20section.%26nbsp%3B%20I%20can%20hand%20type%26nbsp%3B'AB1'%20or%20'CD2'%20or%20'EF3'%26nbsp%3B%20in%20the%20criteria%20and%20the%20query%20will%20work%2C%20but%20when%20drawing%20the%20value%20from%20the%20form%2C%20it%20will%20not%20filter.%26nbsp%3B%20Why%3F%26nbsp%3B%20I%20did%20a%20simple%20expression%2C%20expr1%3A%20%5BForms%5D!%5BFormName%5D!%5BField%5D%20and%20it%20display%20exactly%20as%26nbsp%3B'AB1'%20or%20'CD2'%20or%20'EF3'%20.%26nbsp%3B%20Why%20can't%20it%20filter%20in%20the%20criteria%3F%3F%26nbsp%3B%20Help!!%26nbsp%3B%20Thanks%20in%20advance.%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3ESincerely%2C%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3EPerry%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-306008%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EMS%20Access%202010%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-307632%22%20slang%3D%22en-US%22%3ERe%3A%20Help%20with%20Query%20Criteria%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-307632%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F257646%22%20target%3D%22_blank%22%3E%40perrycheng%3C%2FA%3E%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EGreat%2C%20I'm%20glad%20to%20hear%20you%20worked%20it%20out.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CDIV%3EBest%20regards%2C%3CBR%20%2F%3EDan%3CBR%20%2F%3E%3CBR%20%2F%3E%3CSTRONG%3EDan%20Moorehead%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CI%3EChief%20Software%20Architect%3C%2FI%3E%3CBR%20%2F%3E%3CSTRONG%3EPowerAccess%20%3C%2FSTRONG%3E(%3CA%20title%3D%22PowerAccess%20All-in-One%20Toolset%20%26amp%3B%20Framework%20for%20Microsoft%20Access%22%20href%3D%22https%3A%2F%2Fwww.PowerAccess.net%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3EPowerAccess.net)%3C%2FA%3E%E2%80%93%20All-in-One%3CSTRONG%3EToolset%3C%2FSTRONG%3E%E2%97%8F%20%3CSTRONG%3EFramework%3C%2FSTRONG%3E%E2%97%8F%20%3CSTRONG%3EConsulting%3C%2FSTRONG%3E%26nbsp%3B%20for%26nbsp%3B%20%3CSTRONG%3EMicrosoft%20Access%3C%2FSTRONG%3E%3C%2FDIV%3E%3CDIV%3E%3CSTRONG%3ECrushErrors%20Data%20Prep%20AI%20%3C%2FSTRONG%3E(%3CA%20title%3D%22AI-powered%20Data%20Prep%2C%20Reporting%2C%20Finance%2C%20Reconciliation%2C%20Spreadsheet%20Compare%20%26amp%3B%20Merge%20for%20Excel%20%26amp%3B%20Online%22%20href%3D%22https%3A%2F%2FCrushErrors.com%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3ECrushErrors.com%3C%2FA%3E)%20%E2%80%93%20AI-powered%20%3CSTRONG%3EData%20Prep%20%E2%97%8F%20Reporting%20%E2%97%8F%20Finance%20%E2%97%8F%20Compare%20%E2%97%8F%20Merge%3C%2FSTRONG%3E%26nbsp%3B%20for%26nbsp%3B%20%3CSTRONG%3EExcel%20Add-in%3C%2FSTRONG%3E%26nbsp%3B%3CSTRONG%3E%E2%97%8F%3C%2FSTRONG%3E%20%3CSTRONG%3EEmbedding%3C%2FSTRONG%3E%20%3CSTRONG%3E%E2%97%8F%3C%2FSTRONG%3E%3CSTRONG%3E%20Cloud%3C%2FSTRONG%3E%3C%2FDIV%3E%3CDIV%3E%3CA%20title%3D%22PowerAccess%20All-in-One%20Toolset%20%26amp%3B%20Framework%20for%20Microsoft%20Access%22%20href%3D%22https%3A%2F%2Fwww.PowerAccess.net%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3EPowerAccess.net%3C%2FA%3E%20%7C%20%3CA%20title%3D%22Dan%20Moorehead%20on%20LinkedIn%22%20href%3D%22https%3A%2F%2Fwww.linkedin.com%2Fin%2FDanMoorehead%2F%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3ELinkedIn%3C%2FA%3E%20%7C%20%3CA%20title%3D%22PowerAccess%20on%20Twitter%20(%40PowerAccessSQL)%22%20href%3D%22https%3A%2F%2Ftwitter.com%2FPowerAccessSQL%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3ETwitter%3C%2FA%3E%20%7C%20%3CA%20title%3D%22Connect%20with%20Dan%20Moorehead%20on%20Facebook%22%20href%3D%22https%3A%2F%2Fwww.facebook.com%2FDanLMoorehead%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3EFacebook%3C%2FA%3E%3C%2FDIV%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-306975%22%20slang%3D%22en-US%22%3ERe%3A%20Help%20with%20Query%20Criteria%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-306975%22%20slang%3D%22en-US%22%3E%3CP%3ETY%20but%20I%20was%20able%20to%20figure%20it%20out%20now.%26nbsp%3B%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-306117%22%20slang%3D%22en-US%22%3ERe%3A%20Help%20with%20Query%20Criteria%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-306117%22%20slang%3D%22en-US%22%3ECan%20you%20please%20paste%20the%20entire%20query%20here%20as%20shown%20in%20SQL%20view%2C%20along%20with%20a%20screenshot%20of%20the%20results%20you%20are%20seeing%20in%20Datasheet%20view%3F%3CBR%20%2F%3EA%20screenshot%20of%20the%20form%20you%20are%20using%20for%20criteria%20selection%20%2F%20binding%20may%20also%20help%20provide%20some%20context%20as%20well.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-306012%22%20slang%3D%22en-US%22%3ERe%3A%20Help%20with%20Query%20Criteria%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-306012%22%20slang%3D%22en-US%22%3E%3CP%3Esomeone%20please%20help.%26nbsp%3B%20I%20thought%20this%20is%20just%20a%20brain%20freeze%20on%20my%20side.%26nbsp%3B%20Thank%20you%3C%2FP%3E%3C%2FLINGO-BODY%3E
perrycheng
Occasional Contributor

So, I have a value (text) in a form, that was generated from multiple selected list.  e.g. the text box says, 'AB1' or 'CD2' or 'EF3'   

I want to pass this value ('AB1' or 'CD2' or 'EF3') to a query field (e.g. customer).  Well, I can see that the text can come over, but it is not behaving in the criteria section.  I can hand type 'AB1' or 'CD2' or 'EF3'  in the criteria and the query will work, but when drawing the value from the form, it will not filter.  Why?  I did a simple expression, expr1: [Forms]![FormName]![Field] and it display exactly as 'AB1' or 'CD2' or 'EF3' .  Why can't it filter in the criteria??  Help!!  Thanks in advance.

 

Sincerely,

Perry

4 Replies

someone please help.  I thought this is just a brain freeze on my side.  Thank you

Can you please paste the entire query here as shown in SQL view, along with a screenshot of the results you are seeing in Datasheet view?
A screenshot of the form you are using for criteria selection / binding may also help provide some context as well.

TY but I was able to figure it out now.  

@perrycheng,

 

Great, I'm glad to hear you worked it out.

 

Best regards,
Dan

Dan Moorehead
Chief Software Architect
PowerAccess (PowerAccess.net) – All-in-One ToolsetFrameworkConsulting  for  Microsoft Access
CrushErrors Data Prep AI (CrushErrors.com) – AI-powered Data Prep ● Reporting ● Finance ● Compare ● Merge  for  Excel Add-in  Embedding Cloud
Related Conversations
Tabs and Dark Mode
cjc2112 in Discussions on
46 Replies
Extentions Synchronization
Deleted in Discussions on
3 Replies
Stable version of Edge insider browser
HotCakeX in Discussions on
35 Replies
How to Prevent Teams from Auto-Launch
chenrylee in Microsoft Teams on
30 Replies
flashing a white screen while open new tab
Deleted in Discussions on
14 Replies
Security Community Webinars
Valon_Kolica in Security, Privacy & Compliance on
13 Replies