Create a searcfield in a Accessform

P

Peter

I want to create a searchfield in a Access form were the entered data should
find a specific data in a record in the same form
 
A

Albert D. Kallal

Peter said:
I want to create a searchfield in a Access form were the entered data
should
find a specific data in a record in the same form

Have you tried the "search combo box wizard".

Simply drop in a comb box onto your form, and when the wizard comes up
choose the option to "find a record".

It will build you a box in which you can type in a name, or account number
etc. and that record will then display.
 
A

Allen Browne

If you only need to search on one field at a time, see:
Find as you type - Filter forms with each keystroke
at:
http://allenbrowne.com/AppFindAsUType.html
It consists of a combo (for selecting which field to search), and a text box
(for typing what you want to find.) Copy these into your database.

If you want a more comprehensive search, see:
Search form - Handle many optional criteria
at:
http://allenbrowne.com/ser-62.html
This is an example of how to write code to search on any combination of
criteria, for various data types: numbers, text, ... date ranges, and so on.
 
P

Peter

Thank you Albert, i was more thinking of a textbox that is populated with
specific data...klick on "go" and the record appears...to be placed in the
form header..
 
A

Albert D. Kallal

Peter said:
Thank you Albert, i was more thinking of a textbox that is populated with
specific data...klick on "go" and the record appears...to be placed in the
form header..

Is not that what the search combo box will in fact do? You don't have to
"drop down" the search combo box. If you just type in say a invoice number
and hit tab (or enter), then the record will display. So, that behavior is
really how the search combo box works. You don't have to use the dropdown
feature of the combo box if you don't want to....

You can also build a search form that displays the results of a search.
I give some thoughts on this type of form here:
http://www.members.shaw.ca/AlbertKallal/Search/index.html

I do have a sample "search form" example my super easy word merge here:

http://www.members.shaw.ca/AlbertKallal/msaccess/msaccess.html

I agree that a just a simple text box (or combo box) that you type in the
invoice number or whatever works quite well. That much what the behavior of
the search combo box is? Perhaps I am misunderstanding the question
here? (did you try a search combo box generated by the wizard?).

The "bonus" of the combo box is that if the user can't remember 100% what
they are looking for, they can then expand the combo box. (and, the combo
box also has auto-complete matching as you type).
 

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

Similar Threads


Top