A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

search several fields



 
 
Thread Tools Display Modes
  #1  
Old August 28th, 2006, 05:06 PM posted to microsoft.public.access.forms
Raul Sousa
external usenet poster
 
Posts: 58
Default search several fields

I have a database with client’s details.
Clients table has several fields; name, address, code, etc.
Sometimes users may need to search for one or several fields.

I was thinking of starting with an unbound form with all clients table fields.
The user fill all fields he may want to search for … hit the search button
and another form show the results.

I have not done something like this. I have done it with only one field
searchable.
So, any suggestions are most welcome.

  #2  
Old August 28th, 2006, 06:08 PM posted to microsoft.public.access.forms
Allen Browne
external usenet poster
 
Posts: 11,706
Default search several fields

Take a look at:
Search form - Handle many optional criteria
at:
http://allenbrowne.com/ser-62.html

--
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.

"Raul Sousa" wrote in message
...
I have a database with client's details.
Clients table has several fields; name, address, code, etc.
Sometimes users may need to search for one or several fields.

I was thinking of starting with an unbound form with all clients table
fields.
The user fill all fields he may want to search for . hit the search button
and another form show the results.

I have not done something like this. I have done it with only one field
searchable.
So, any suggestions are most welcome.



  #3  
Old August 28th, 2006, 06:27 PM posted to microsoft.public.access.forms
Al Campagna
external usenet poster
 
Posts: 421
Default search several fields

Raul,
Have you tried using the built in Filter By Form? That would be the easiest... if it
suits your needs. With a bit of practice, it's very useful.

Otherwise, an unbound Search Dialog form where the user enters various field values to
search for would be a good way to go.

Let's say you wanted to search for a LastName in a State.
Use criteria like these against those fields in your query...
Like Forms!frmSearchDialog!LastName & "*"
Like Forms!frmSearchDialog!State & "*"

ex. "Jones"
Is State was left null, the query would still find all Jones records regardless of
State.
ex. "Jones" "NY"
If State was indicated, the query would deliver all Jones and NY records.
ex. "J" "NY"
Would return all LastNames beginning with "J" in "NY"

--
hth
Al Camp
Candia Computer Consulting - Candia NH
http://home.comcast.net/~cccsolutions


"Raul Sousa" wrote in message
...
I have a database with client's details.
Clients table has several fields; name, address, code, etc.
Sometimes users may need to search for one or several fields.

I was thinking of starting with an unbound form with all clients table fields.
The user fill all fields he may want to search for . hit the search button
and another form show the results.

I have not done something like this. I have done it with only one field
searchable.
So, any suggestions are most welcome.



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 09:06 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.