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 feature?



 
 
Thread Tools Display Modes
  #1  
Old April 28th, 2008, 09:23 PM posted to microsoft.public.access.forms
twalsh
external usenet poster
 
Posts: 28
Default Search feature?

I have form with several subforms showing a great many aspects of employee
data. This information is present for over 5000 employees.

I want to add Single Simple form to start with and have it as a "Search
Screen"
So you will have several empty text boxes associated with a field and you
enter what criteria you know and click a command button that brings you to
the form with that employees data. I found the QBF_Macro support page but it
brings the info up as a datasheet instead of the form.

Also if possible i would like to have a "Middle Man Form" that shows up only
if the entered criteria brings more than one result and you can pick which
result you want...
  #2  
Old April 28th, 2008, 09:47 PM posted to microsoft.public.access.forms
Golfinray
external usenet poster
 
Posts: 1,597
Default Search feature?

I would start by checking Martin Green at www.fonstuff.com and Allen Browne
at www.allenbrowne.com. I think both have examples of what you need.

"twalsh" wrote:

I have form with several subforms showing a great many aspects of employee
data. This information is present for over 5000 employees.

I want to add Single Simple form to start with and have it as a "Search
Screen"
So you will have several empty text boxes associated with a field and you
enter what criteria you know and click a command button that brings you to
the form with that employees data. I found the QBF_Macro support page but it
brings the info up as a datasheet instead of the form.

Also if possible i would like to have a "Middle Man Form" that shows up only
if the entered criteria brings more than one result and you can pick which
result you want...

  #3  
Old April 28th, 2008, 09:49 PM posted to microsoft.public.access.forms
Klatuu
external usenet poster
 
Posts: 7,074
Default Search feature?

You could use text boxes, or were I doing it, I would use text boxes that
would return a list of the available values in each field.
Then in the click event of the search button, build an SQL string with a
WHERE clause based on the value in each text box.

Then open a recorset based on the query and see how many rows are returned.
If none are return present a message box stating no matching employee found.
If one record is returned, open your form using the employee table's primary
key field as the value for the Where argument of the OpenForm method. If
multiple records are returned, open the middle man form using the same
technique, except you would build the Where argument using the keys from all
returned records using ORs.
--
Dave Hargis, Microsoft Access MVP


"twalsh" wrote:

I have form with several subforms showing a great many aspects of employee
data. This information is present for over 5000 employees.

I want to add Single Simple form to start with and have it as a "Search
Screen"
So you will have several empty text boxes associated with a field and you
enter what criteria you know and click a command button that brings you to
the form with that employees data. I found the QBF_Macro support page but it
brings the info up as a datasheet instead of the form.

Also if possible i would like to have a "Middle Man Form" that shows up only
if the entered criteria brings more than one result and you can pick which
result you want...

 




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 02:06 PM.


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