G
Guest
Good morning
I am currently working on a program that is basically a search threw a
recordset. It gives the user a display of the records that con be scrolled
threw and a text box, or check box for each field to search threw. The search
gets activated in the changed event of the boxes and basically builds a
complete recordset and deletes from the recordset all the records that don't
match. Doing this I have built a search that updates on every keystroke and
searches multiple records at once.
The problem is that in the module when I access the other fields I must
set focus to them to get at there text, quickly setting focus back to the
original text box there after, except that when you type a Space, it trims it
off after loss of focus resulting in not being able to use spaces in the
search as it simply disappears right after you enter it.
I have already tried to check for a space before the loss of focus and
add one after if there was one, but that creates an infinite recursive loop,
as the function keeps calling it's self when the text changes.
If anyone knows of a way to turn off this auto-trim, or maybe make the
changed event not fire when you manually change the text box that would be
very helpful.
- Alex
I am currently working on a program that is basically a search threw a
recordset. It gives the user a display of the records that con be scrolled
threw and a text box, or check box for each field to search threw. The search
gets activated in the changed event of the boxes and basically builds a
complete recordset and deletes from the recordset all the records that don't
match. Doing this I have built a search that updates on every keystroke and
searches multiple records at once.
The problem is that in the module when I access the other fields I must
set focus to them to get at there text, quickly setting focus back to the
original text box there after, except that when you type a Space, it trims it
off after loss of focus resulting in not being able to use spaces in the
search as it simply disappears right after you enter it.
I have already tried to check for a space before the loss of focus and
add one after if there was one, but that creates an infinite recursive loop,
as the function keeps calling it's self when the text changes.
If anyone knows of a way to turn off this auto-trim, or maybe make the
changed event not fire when you manually change the text box that would be
very helpful.
- Alex