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 1

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 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:

 
i think u can join the 'where' statements e.g.

WHERE ( Chapters > 25 OR Chapters < 20 ) AND Published < 1945

so ...

WHERE (date BETWEEN [Start Date:] AND [End Date:]) AND usernumber = [Please enter your user number:] ===============
Security Forums
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top