Advanced Form Search - Code tweak needed

S

sinessines

Hello.

In regard to
http://groups.google.com/group/micr...mation+dialogue+help+&rnum=1#8adcdb08d95dd49c

the author failed to mention that this code is used for a form called
"Find Record" and the form is called by click event on any open form
you want to search.

Now to my point, i have been using this code for a search and to make
it more efficient i need to search on a specific field on the form not
just the whole form, eg. primary key, so if the form with that code
above has more than one textfield, ie the field you want to search by
before you click search, how would you tweak the code to achive this?

Also if anyone can solve the problem where if nothing is found (as
author above had), a return is given (eg. pop up macro), i couldnt
find out where to place the code i tried within many if statements
adding in to call the macro but it wouldnt work.

Many thanks

sinessines
 
A

Allen Browne

You want to search a specific field, rather than all fields, so the code
will be quite different.

Take a look at:
Find as you type - Filter forms with each keystroke
at:
http://allenbrowne.com/AppFindAsUType.html
It's a sample database you download, and copy the module into your database.
Then you copy a combo and a text box to any form. Use the combo to choose
which field to search, and the text box to type the value to find.
 
S

sinessines

You want to search a specific field, rather than all fields, so the code
will be quite different.

Take a look at:
Find as you type - Filter forms with each keystroke
at:
http://allenbrowne.com/AppFindAsUType.html
It's a sample database you download, and copy the module into your database.
Then you copy a combo and a text box to any form. Use the combo to choose
which field to search, and the text box to type the value to find.

--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users -http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.












- Show quoted text -


thanks but the whole point of using this code as i did was to have a
sort of 'no frills' search box and also i need the output of the
search to be selected in the current open form. I need such code that
would use a generic search box for each of my forms and using such a
function as "currentof" or "this" on each form ?
 
Top