Multi-field search form

  • Thread starter news.microsoft.com
  • Start date
N

news.microsoft.com

Hi there,

I am rather new to this place, so I would like to thank you all up front
for any and all assistance you may provide. :)

It has been a while since I worked with MS Access last. What I am trying
to do is create a multi-field search form, where any of the fields can
be filled which will display a result set. Preferably if no selection in
the fields is made, the entire resultset should be shown - this is not a
requirement, though.

I seem to be a bit at a loss on how to procede with this task or to find
any resources to help me get along.

Again, thanks for any and all assistance. If you require more
information, please let me know!

Kind regards,
Kevin
 
D

Dennis

Kevin,

I'm not quite sure what you mean by "a multi-field search form, where any of
the fields can be filled which will display a result set."

Are you saying that you want to create a form that has multiple text boxes
where each text box refers to a different field? When the user enters
something in the different text controls, you want to search on them.

If the user enters multiple selections do you want to do an "AND" or "OR'
search? That is, if the user enters something in the cust name and address
search boxes, which of the following searches do you want to do?

1. Select CustomerTbl Where CustName = "data" AND Address = "data"

or

2. Select CustomerTbl Where CustName = "data" OR Address = "data"


These queries produce two VERY different result.

Dennis
 
K

Kevin

Op 8-4-2010 6:33, Dennis schreef:

First of all, thank you for responding! I will answer you below your
questions.
Kevin,

I'm not quite sure what you mean by "a multi-field search form, where any of
the fields can be filled which will display a result set."

Are you saying that you want to create a form that has multiple text boxes
where each text box refers to a different field? When the user enters
something in the different text controls, you want to search on them.

That is correct. For instance a the search form offers the options to
search on "Name" and "Zipcode". When only the zipcode would be entered
on might find a larger result set then with "name". However, if one
searches on "name" they will get another result set. In either case the
one entering the search queries will have to go through the result set
to find the correct record. When both are entered the result set is a
lot smaller and thus the correct record could easily be located.
If the user enters multiple selections do you want to do an "AND" or "OR'
search? That is, if the user enters something in the cust name and address
search boxes, which of the following searches do you want to do?

1. Select CustomerTbl Where CustName = "data" AND Address = "data"

or

2. Select CustomerTbl Where CustName = "data" OR Address = "data"

I realize I have been unclear. What I am looking for is an "AND"
solution, where not all search fields will have to be filled. But the
more information is entered on the search form the smaller the result
set should become.
These queries produce two VERY different result.

Dennis

I hope this clarifies what I am looking for a bit. Again, thank you for
responding.

Kevin
 
J

John W. Vinson

Hi there,

I am rather new to this place, so I would like to thank you all up front
for any and all assistance you may provide. :)

It has been a while since I worked with MS Access last. What I am trying
to do is create a multi-field search form, where any of the fields can
be filled which will display a result set. Preferably if no selection in
the fields is made, the entire resultset should be shown - this is not a
requirement, though.

I seem to be a bit at a loss on how to procede with this task or to find
any resources to help me get along.

Again, thanks for any and all assistance. If you require more
information, please let me know!

Kind regards,
Kevin

You might want to look at Allen Browne's generic search form example:

http://allenbrowne.com/ser-62.html
 

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