Error 2185 - Strange behaviour of textbox (1 Viewer)

MajP

You've got your good things, and you've got mine.
Local time
Today, 05:25
Joined
May 21, 2018
Messages
8,529
So in my case, i found a solution that is moving the searchbox to parent form and apply filte
Yes, in the original post, I mention that approach several times as a potential solution.
1. Instead of the search box in the header with a detail section, make it a main form with a tabular subform. For some reason this will work. You can format it to look almost the same.
2. Check that records are returned by the search. If not roll the search back.. If no records returned by BALZ strip it back to BAL which will return records. Do not try to search for BALZW

 

MajP

You've got your good things, and you've got mine.
Local time
Today, 05:25
Joined
May 21, 2018
Messages
8,529
So what is the benefit of using Change Event instead of KeyUp event in this case?
The keyup event follows immediately after the change event. The only thing I can think of is that the change event will occur if I paste something into the control with a mouse this will not happen with the keyup. So the change will capture more. FYI neither happens if the change is through code.

KeyDown
arrow
KeyPress
arrow
Dirty
arrow
Change
arrow
KeyUp
 

Babycat

Member
Local time
Today, 16:25
Joined
Mar 31, 2020
Messages
275
The only thing I can think of is that the change event will occur if I paste something into the control with a mouse this will not happen with the keyup.
I just realized it, yes, it does search when paste data by mouse.
 

Babycat

Member
Local time
Today, 16:25
Joined
Mar 31, 2020
Messages
275
The keyup event follows immediately after the change event. The only thing I can think of is that the change event will occur if I paste something into the control with a mouse this will not happen with the keyup. So the change will capture more. FYI neither happens if the change is through code.
Ah... not every keystroke make data change, ex arrow keys. So the change event is the best to use
 

Users who are viewing this thread

Top Bottom