473,396 Members | 1,892 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Help with search function

15
hi.. i am currently creating an employee database.. and there is a form on
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
  1. SELECT tblEmployee.EmployeeIDPK, tblEmployee.LastName, tblEmployee.FirstName,
  2. tblEmployee.MiddleName, tblCompany.CompanyName, tblDealer.DealerName,
  3. tblOutlet.OutletName, tblPosition.PositionName
  4. FROM (tblOutlet INNER JOIN (tblDealer INNER JOIN (tblCompany INNER JOIN
  5. tblPosition ON tblCompany.CompanyIDPK = tblPosition.CompanyIDFK) ON tblDealer.
  6. DealerIDPK = tblPosition.DealerIDFK) ON tblOutlet.OutletIDPK = tblPosition.
  7. OutletIDFK) INNER JOIN tblEmployee ON tblPosition.PositionIDPK = tblEmployee.
  8. PositionIDFK
  9. WHERE (((tblPosition.PositionName)=[Forms]![frmSearchEmployee]![txtSearchFor])
  10. ) OR (((tblOutlet.OutletName)=[Forms]![frmSearchEmployee]![txtSearchFor])) OR
  11. (((tblDealer.DealerName)=[Forms]![frmSearchEmployee]![txtSearchFor])) OR ((
  12. (tblCompany.CompanyName)=[Forms]![frmSearchEmployee]![txtSearchFor])) OR ((
  13. (tblEmployee.MiddleName)=[Forms]![frmSearchEmployee]![txtSearchFor])) OR ((
  14. (tblEmployee.FirstName)=[Forms]![frmSearchEmployee]![txtSearchFor])) OR ((
  15. (tblEmployee.LastName)=[Forms]![frmSearchEmployee]![txtSearchFor])) OR ((
  16. (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/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..
Oct 17 '06 #1
1 1762
MMcCarthy
14,534 Expert Mod 8TB
Does this part of the query work and return all records?

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;
Oct 17 '06 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Rahul | last post by:
Hi Everybody I have some problem in my script. please help me. This is script file. I have one *.inq file. I want run this script in XML files. But this script errors shows . If u want i am...
23
by: casper christensen | last post by:
Hi I run a directory, where programs are listed based on the number of clicks they have recieved. The program with most clicks are placed on top and so on. Now I would like people to be apple to...
0
by: gunimpi | last post by:
http://www.vbforums.com/showthread.php?p=2745431#post2745431 ******************************************************** VB6 OR VBA & Webbrowser DOM Tiny $50 Mini Project Programmer help wanted...
3
by: cuties | last post by:
Hi all.... i'm very new to this programming language. i'm required to fulfill this task in the company i'm doing my practical. i hope i can get guide for my problem... Here is the script i...
22
by: Amali | last post by:
I'm newdie in c programming. this is my first project in programming. I have to write a program for a airline reservation. this is what i have done yet. but when it runs it shows the number of...
3
markmcgookin
by: markmcgookin | last post by:
Hi Folks, I have a VB app, and I have been working at it for a while, and I am now at the stage where I want to create a search function. Now don't be scared! It is in the .Net compact framework,...
9
by: pic078 via AccessMonster.com | last post by:
I need serious help - I have a frontend/backend Access database (2 MDE Files) that remains stuck in task manager after exiting the application - you can't reopen database after exiting as a result...
0
by: kang jia | last post by:
hi currently i am doing this search function for car booking website. it can search through either car seats or CarModel. it seems it able to do search function, however i small problem occurs to...
16
by: gnawz | last post by:
I have a pagination function I am using in a file called functions.php as below<? //Pagination functions function getPagingQuery($sql, $itemPerPage = 10) { if (isset($_GET) && (int)$_GET > 0) ...
4
by: mattehz | last post by:
Hey there, I am trying to upload old source files and came across these errors: Warning: Invalid argument supplied for foreach() in /home/mattehz/public_html/acssr/trunk/inc_html.php on line 59...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.