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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

HOW TO QUERY BY DATE AND USER

Status
Not open for further replies.

jesusbearer

Technical User
Jan 18, 2003
9
US
Hi! I'm new to programming and have the task of making improvements to out Access 97 database.

This is probably a no-brainer: Is there a way to query for two results from a single table? I need to show all entries entered by a single employee for a given week.

I am able to do a query by date using an SQL something like this:

SELECT a, b, c, usernumber, date
FROM table1
WHERE date BETWEEN [Start Date:] AND [End Date:];

And I can query by employee using this SQL:

PARAMETERS [Please enter your user number:] text;
SELECT a, b, c, date, usernumber
FROM table1
WHERE usernumber = [Please enter your user number:];

I would appreciate any advice in how to combine the two into one query. Thanks in advance! :cool:
 


SELECT a, b, c, usernumber, date
FROM table1
WHERE date BETWEEN [Start Date:] AND [End Date:] and usernumber = [Please enter your user number:]; "What a wonderfull world" - Louis armstrong
 
Thanks! I'll give that a try.

You helped Satchmo's words ring true. :cool:
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top