Can I biuld this Search Form

G

Guest

Thank you in advance for any help I might get.

I would like to biuld a search function into a form, I have an unbound form
which has a continous subform on it, is it possible to add an unbound textbox
on the formwhich can be used to search the records on in the subform, ideally
I would like it to search as I type, but would be qiute happy if it would
just search after I have finished.

The field I would like to search by is IDnumber, I realsie I need some code
to do this, I have searched the forums but dont seem to be able to find
anything (could just be me)

hope someone can help

thanks

Phil
 
A

Allen Browne

The standard approach is to use the AfterUpdate event procedure of the
control, like this:
http://allenbrowne.com/ser-03.html
That example uses a combo, but the code is identical for a text box.

If you want to filter after each keystroke, use the Change event of the text
box, and be sure to work with the Text property, not its Value (since the
Value has not been updated yet.)

That's a very simple-to-implement example here:
Find as you type - Filter forms with each keystroke
at:
http://allenbrowne.com/AppFindAsUType.html
It consists of a combo where you select which field to search, and a text
box where you type the value to find. To use it on any form, copy the combo
and text box, and set one property.
 
G

Guest

Hi Allen

thanks for your reply. I had already seen your filter forms
(AppsFindasyoutype) solution I have copied it to a memory stick to unzip @
home our IT dept will not supplie those of us on W2000 with unzip software.

Just a few questions about your code, I have not used it yet, do I have to
modify it to search a subform sorry feeling a little thick today

thanks for your reply

Phil
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top