Reply
Help with Search Form
Old 10-16-2006, 03:16 AM Help with Search Form
lushh's Avatar
Novice Talker

Posts: 10
Name: Eunice
hi guys... i am currently working on a search form for my database.. here's
how my form looks like:

http://i114.photobucket.com/albums/n...clientform.jpg

when the user will type in for example "EOT Corp." in the "Search for" field
and will choose "Company Name" in the "Search by" combo box, the database
will look for all the "EOT Corp." entries under the field of "Company Name"
in a table. There will be a lot of category to search from such as Position Name, Company Name, Dealer name, Outlet Name, Employee Name and Employee ID..

the results should be shown in a continuous form...

does anyone has a sample SQL query or VBA code for this function? i've been searching for it, but unfortunately i wasn't able to find what i was looking for. thank you very much. all your replies would mean so much.

if you want, you can also check the actual ms access file:

http://www.gigafiles.co.uk/files/636...2006-09-27.zip

the name of the form is frmSearchEmployee...

thanks a lot... =)

Last edited by lushh : 10-16-2006 at 03:19 AM.
lushh is offline
Reply With Quote
View Public Profile
 
When You Register, These Ads Go Away!
Old 10-16-2006, 03:39 AM Re: Help with Search Form
seomumbai's Avatar
Skilled Talker

Posts: 98
one small thing can u plz specify wat the vba means is it visual basic i can help u plz say that wat is vba
seomumbai is offline
Reply With Quote
View Public Profile
 
Old 10-16-2006, 11:26 PM Re: Help with Search Form
lushh's Avatar
Novice Talker

Posts: 10
Name: Eunice
VBA is visual basic for applications...

well, i tried to change the search form into only one textbox (for the keyword entry) and a search command button
that when clicked, the search results will be shown in a seaparate continuous form.

now here is my query:

Code:
SELECT tblEmployee.EmployeeIDPK, tblEmployee.LastName, tblEmployee.FirstName,
tblEmployee.MiddleName, tblCompany.CompanyName, tblDealer.DealerName,
tblOutlet.OutletName, tblPosition.PositionName
FROM (tblOutlet INNER JOIN (tblDealer INNER JOIN (tblCompany INNER JOIN
tblPosition ON tblCompany.CompanyIDPK = tblPosition.CompanyIDFK) ON tblDealer.
DealerIDPK = tblPosition.DealerIDFK) ON tblOutlet.OutletIDPK = tblPosition.
OutletIDFK) INNER JOIN tblEmployee ON tblPosition.PositionIDPK = tblEmployee.
PositionIDFK
WHERE (((tblPosition.PositionName)=[Forms]![frmSearchEmployee]![txtSearchFor])
) OR (((tblOutlet.OutletName)=[Forms]![frmSearchEmployee]![txtSearchFor])) OR
(((tblDealer.DealerName)=[Forms]![frmSearchEmployee]![txtSearchFor])) OR ((
(tblCompany.CompanyName)=[Forms]![frmSearchEmployee]![txtSearchFor])) OR (((tblEmployee.MiddleName)=[Forms]![frmSearchEmployee]![txtSearchFor])) OR (((tblEmployee.FirstName)=[Forms]![frmSearchEmployee]![txtSearchFor])) OR (((tblEmployee.LastName)=[Forms]![frmSearchEmployee]![txtSearchFor])) OR (((tblEmployee.EmployeeIDPK)=[Forms]![frmSearchEmployee]![txtSearchFor]));
but when i click search, the results are empty. what could be wrong with the query? is it the query? what should be the record source for the search form and the result form?

if you want to see the actual ms access file, here it is:
http://www.gigafiles.co.uk/files/636...2006-10-11.zip

the name of the form is frmSearchEmployee and frmSearchResultEmployee and the name of the query is qrySearchResultEmployee.. thanks a lot and God bless..
lushh is offline
Reply With Quote
View Public Profile
 
Old 10-17-2006, 01:05 AM Re: Help with Search Form
mgraphic's Avatar
Truth Seeker

Latest Blog Post:
Converting Video For YouTube
Posts: 2,339
Name: Keith Marshall
Location: West Hartford, CT
If MS Access allows it, set your index types to FULLTEXT and use match() against() which will produce good results.
__________________

<mgraphic /> - I don't have a solution but I admire the problem.
mgraphic is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Help with Search Form
 

Thread Tools

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 On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Webmaster Resources Marketplace:
Software Development Company | Webhosting.UK.com | Text Link Brokers 


   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 


Page generated in 0.14089 seconds with 12 queries