Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

The Database Forum


You are currently viewing our The Database Forum as a guest. Please register to participate.
Login



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
Trades: 0
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
 
 
Register now for full access!
Old 10-16-2006, 03:39 AM Re: Help with Search Form
seomumbai's Avatar
Skilled Talker

Posts: 98
Trades: 0
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
Trades: 0
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:
JAMISONTUNES
Posts: 2,898
Name: Keith Marshall
Location: Connecticut
Trades: 0
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 Search this Thread
Search this Thread:

Advanced Search

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





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



Page generated in 0.32981 seconds with 12 queries