searching for a given record

C

cbnewman

I have to think there is a very easy way to do this, but I've been
struggling for a couple of days now and I could use some help.

All I want to do is search for a particular record using a form. I
don't want my users to have to right click and even think about
filters or anything like that. I want them to be able to type in a
partial name and press a button on the form and have the matching
records pulled into the form.

What's the best way to accomplish this?

--b
 
L

Larry Daugherty

Open the relevant form in design mode and make some room in the form's
header. With the wizards enabled, draw a combobox in the header.
Tell the wizard you want to go to a particular record.

HTH
 
C

cbnewman

I evidently overlooked the significance of using the setFocus command
prior to issuing a DoCmd.FindRecord statement.

How about if I want to further refine the results of a query or
filter?

For example, find record does pretty much what I want, but suppose I
have more than one record with the last name Smith. Suppose I want to
refine the search further, say by incorporating the user input from a
second combo box.
 
C

cbnewman

And there seems to be something special about having the combo box in
the header as opposed to the form detail, as all of the tricks that I
tried before about modifying the filter, etc are working like a
charm.

--b
 
B

Brian Smith

And there seems to be something special about having the combo box in
the header as opposed to the form detail, as all of the tricks that I
tried before about modifying the filter, etc are working like a
charm.

Nothing special about the form detail section. You need to remember that the
form detail section is showing you the details for one record. The header
applies to all of the records and this is why you want your combo box in
that section. Also, there is no need to have to have a second step in a
search process. Setup your search combo box so it searches for a unique
record, more than likely based on an auto number id. The combo box can also
show more than one field so if you have more than one Smith for example you
can also show users the person's first name, city, etc. Show them enough
info so they can select the person they are looking for.

Brian
 

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