the database that needs to search on records.. i am planning to create a form
with a single 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:
Expand|Select|Wrap|Line Numbers
- 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]));
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/human%20resource%20info%20system_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..