vaughanmcd
New member
- Local time
- Tomorrow, 00:38
- Joined
- Oct 20, 2022
- Messages
- 7
Hello I have this bit of code for a search on a continuous form and it is working , I want improve it a bit by adding a check box to only include a predefined word in the data on the form "True"
How would I change the code to allow the results to only include records with the word "True" from the Inventory Item Inventory Item Column?
I also want to change the search box to allow two phrases across the 3 columns, It currently will only search the term as it is written in the box, So if I want to find a record with 123 from [part number] and fox from [description] I have to type one or the other I cant type both phrases with a space.
How would I change the code to allow the results to only include records with the word "True" from the Inventory Item Inventory Item Column?
I also want to change the search box to allow two phrases across the 3 columns, It currently will only search the term as it is written in the box, So if I want to find a record with 123 from [part number] and fox from [description] I have to type one or the other I cant type both phrases with a space.
Code:
Private Sub Command11_Click()
Me.Finder.SetFocus
Me.FilterOn = False
Me.Filter = "[Part Number] like '*" & Finder & "*' or [Universal Product Code] like '*" & Finder & "*' or [Description] like '*" & Finder & "*'"
Me.FilterOn = True
End Sub