Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Query 1

Status
Not open for further replies.

mrkshpntf

MIS
Apr 19, 2007
92
US
I have a table (no PK is established for the table) with multiple records for an employee ID and with multiple employees.

I want to create a query in which the parameter is the employee ID and will return the multiple records for each of the IDs.

Please help.

Thanks,
mrkshpntf
 
What is the problem ?
SELECT * FROM youTable WHERE [employee ID]=[Enter the employee ID]

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 

PHV,

When I run the query, it generates the table again i.e. it doesn't give the values that match the criteria but gives everyting in the table.

Thanks for your help.

mrkshpntf.
 
When I run the query
Which query ?

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 

Sorry PHV,

I meant when I run:

SELECT * FROM youTable WHERE [employee ID]=[Enter the employee ID]
 
Doesn't this query prompt you for an ID and then display all the records having the typed ID ?
 


PHV,

It prompts me twice for the (same) ID and then generates the whole table.

Thanks,

mrkshpntf.
 
So, double check the spelling of the table and fields in your query ...
 


PHV,

I am sorry to bother you with stupid mistakes.

I was using the wrong table and field names.
The query works.

Thanks for your help and patience. It is very much appreciated!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top