Use "contains" text filter for a query through a form input (1 Viewer)

tim1982

Registered User.
Local time
Yesterday, 22:41
Joined
Feb 18, 2009
Messages
21
Hello,

I have a receiving log where WorkOrder numbers are attached to each receiving ID.... I'm trying to have a "search query" option inside my input form.

I save the input (4 numbers) in a blank text box called [SearchInput] and then have a button to open the query I want to filter....

The macro "On Enter" for the button is


OpenQuery
Details Query, Datasheet, Read Only)

ApplyFilter
, [Details Query].[ACOrderNo] Like [Forms].[Deliveries].[SearchInput],


I need the search to be similar to a "contains" text filter, so I tried putting *.* around the [Forms].[Deliveries].[SearchInput], and tried putting it all between "", but it won't seem to work.

Any help appreciated. Thanks.

Tim
 

Atomic Shrimp

Humanoid lifeform
Local time
Today, 06:41
Joined
Jun 16, 2000
Messages
1,954
try:

[Details Query].[ACOrderNo] Like "*" & [Forms].[Deliveries].[SearchInput] & "*"
 

tim1982

Registered User.
Local time
Yesterday, 22:41
Joined
Feb 18, 2009
Messages
21
Works perfectly. Thanks a lot, Mike.
 

Users who are viewing this thread

Top Bottom