E
eselk2003
I have some VBA code that uses RecordSet.FindFirst and
RecordSet.FindNext. Sometimes the search takes a long time, around a
minute or more. I don't need to speed it up, but I would like to make
it easy for the user to cancel, for example if they noticed they typed
in the wrong search text. Any ideas?
I have a form that I show when the user hits CTRL-F while in any field
on any of my forms. It has a place for them to enter some text to
find, and a Find, Find Next, and Find Previous buttons. Then I take
the text they enter and search for it in the current field, using some
VBA script. I do this because the built-in find features in Access
are too complicated for these users.... so I need something that will
work with what I've got, and not force me to use the built-in find/
search options.
It seems like CTRL+ALT+END does cancel the find, but it also halts
execution of my VBA script, which leaves things in a weird state (for
one thing, I set the mouse cursor to an hour-glass, and that then is
stuck until they restart Access). If I could catch the CTRL+ALT+END
stopping the find, and restore everything, that would be nice, but I
don't think that is possible since that hotkey stops my scripts, so
any error handling or anything wouldn't help. I've tried CTRL+BREAK,
ESC, and other things I could think of, but those don't do anything
(don't stop the search).
RecordSet.FindNext. Sometimes the search takes a long time, around a
minute or more. I don't need to speed it up, but I would like to make
it easy for the user to cancel, for example if they noticed they typed
in the wrong search text. Any ideas?
I have a form that I show when the user hits CTRL-F while in any field
on any of my forms. It has a place for them to enter some text to
find, and a Find, Find Next, and Find Previous buttons. Then I take
the text they enter and search for it in the current field, using some
VBA script. I do this because the built-in find features in Access
are too complicated for these users.... so I need something that will
work with what I've got, and not force me to use the built-in find/
search options.
It seems like CTRL+ALT+END does cancel the find, but it also halts
execution of my VBA script, which leaves things in a weird state (for
one thing, I set the mouse cursor to an hour-glass, and that then is
stuck until they restart Access). If I could catch the CTRL+ALT+END
stopping the find, and restore everything, that would be nice, but I
don't think that is possible since that hotkey stops my scripts, so
any error handling or anything wouldn't help. I've tried CTRL+BREAK,
ESC, and other things I could think of, but those don't do anything
(don't stop the search).