Textbox filter allowing only 1 character...

CrystalSurfer

Matrix activist
Local time
Today, 14:34
Joined
Jan 11, 2006
Messages
75
I have a filter (via textbox) on a form that only allows 1 character at a time to be typed (!!?) ie: after typing in "a" it highlights it, which means the next letter I type in, replaces the "a".

When I use the mouse to re-click after the letter entered, it does allow further characters.

What am I missing here?

The code for the filter:
Code:
Private Sub txtClientSearch_Change()
    
    On Error GoTo ErrorHandler
    
    Forms!frmClient.Filter = "Name Like " & Chr$(34) & "*" & Forms!frmClient!txtClientSearch.Text & "*" & Chr$(34)
    Forms!frmClient.FilterOn = True

ExitProcedure:
    Exit Sub
    
ErrorHandler:
    DisplayError "txtClientSearch_Change", Me.Name
    Resume ExitProcedure
End Sub

Many thanks!

..Is it anything to do with Focus?
 
Last edited:
I've tried out a new filter text box on a subform header and I'm still getting the same result!

Suggestions anyone please?

btw, the actual search part does work - but the text box is not allowing any contiguous typing!
 
Last edited:
Can I assume this is one of those 'quirky' problems that no one can suggest any possible hint for?
:(
 
Found a solution!

I put the following in the OnEnter event for the Textbox and it works! - it repositions the cursor to the end of the text in the control.
The only thing is that even with just 800 records its slow to requery after a letter change in this search box...

Me![TextboxControl].SelStart = Me![TextboxControl].SelLength
:p

anybody know of a quicker way to search?
 
Last edited:

Users who are viewing this thread

Back
Top Bottom