Setting up a "Contains" type search Text Box on a Form

David Ball

Registered User.
Local time
Today, 16:05
Joined
Aug 9, 2010
Messages
230
Hi,

I have a Textbox (Text7) on a Form that I use to Search for part numbers, I enter a part number in the Textbox then press a Control Button that opens a query showing me the delivery date for the part number.
The query with the part numbers and dates has the following in the Criteria row of the Part Number field:
[Forms]![frmFindDates]![Text7]
I would like to set up another search textbox that allows the entry of partial part numbers, as many are very similar for similar parts. Users could then view dates for similar part numbers in one query.
How would I modify what is in the Criteria row to allow me to search in a “Contains” type fashion? Would users need to use wildcards in the search textbox?

Thanks very much
 
No users don't need wildcards, put them in the query...


Select * from table where [field] like "*" & forms!frmFimd!txtBox & "*"
 
Try

Like "*" & [Forms]![frmFindDates]![Text7] & "*"

The user would not need to enter wildcards.
 

Users who are viewing this thread

Back
Top Bottom