you know, if you type "screw #10*pan" in the example db you sent me, it filters acceptably.
But then it never filters anything else again - even after close and reopen.
Weird huh?
Well, I'm going to jump in the middle of this.
You said:
With your current
txtSearchDesc_Change()approach, you do the filtering/searching after every character is typed into a text box.
YOU GOT IT-EXACTLY what I want and she doesn't care how they filter-as-she-types as long as the description...
How does that fit into here?
I don't know how to make those variables.
Private Sub txtSearchDesc_Change()
Me.sfrm_Search.Form.Filter = "strDescription like '" & Replace(Me.txtSearchDesc.Text, "#", "[#]") & "*'" ' where SomeText is the fieldname you want to filter on, and noting that #...
Andy! I forgot to say that I am seriously considering your added cmd button idea if I can't make this thing do what I want.
That's a good workaround; I never would have thought of it.
I am awfully stubborn but sometimes I have to compromise.
If I can get these people's Sales Order/Purchase Order...
HURRAH INDEED!!
Thanks for the example database - very helpful!
Well, (forgive me), it works great if I key in the description exactly, starting with first character and filtering merrily along in sequence.
However, the filtering I am trying to reproduce will let her key in "Screw (pulls up...
I have a form frm_Search and a subform sfrm_Search
On the form is txtSearchDesc which should filter strDescription on the subform as you type.
The form is unbound, the subform table is dbo_IN_Master.
May we start from the beginning,please as I am totally confused about the code.
No change
I type the first word and then hit the spacebar and it just sits there.
If I keep typing, same error on this line: txtSearchDesc.SelStart = myStart
Alright. Works!
Until after I type the first word and then hit the spacebar.
If I keep typing with no space, I get error 2185.
debugs to this line: txtSearchDesc.SelStart = myStart
I'm not sure where to put this line: Is it a sub or does it need Dim or what?:
Private myStart As Long ' holds...
New issue: how to remove problematic characters in strDescription like quotation marks, single quotation marks and hash marks in the searching?
They have 38k inventory items that they are not going to fix for me. Many, many with those characters.
Hi Helpers!
I have a continuous form (no subforms) with search textboxes on the header.
The table fieldname is strDescription and its label on the form is "Description" and the textbox is txtSearchDesc
The fields other than strDescription are not involved in the searches (because I am not...
OK strongm - you got me.
Forget the #Name? thing - Idiot mistake on my part. :(
However, the filter as you type doesn't work.
Only look at first picture (ha).
Jana
OK, let me look at that again.
The query of the form definitely contains strDescription and the other 4 fields as you can see.
As I typed Washer, the form did not filter at "w" or "wa" etc. or at all.
When I key "w", form should filter to all descriptions that begin with "w", when I key wa...
strongm, yes, absolutely!
Private Sub txtSearchDesc_Change()
Me.Filter = "strDescription like '" & Me.txtSearchDesc.Text & "*'" ' where SomeText is the fieldname you want to filter on
Me.FilterOn = True ' make sure filter is activated
End Sub
I got #Name? error on all the fields as...
Hi Y'all!
Well, I'm lost.
I was unable to transfer this code to the textbox, txtSearchDesc, (changing the references to textbox instead of combo box) and get it to work.
The filter as you type part is just what I want (if I wanted it to filter the combo box. Form is what needs filtered.)
Here...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.