Query query!

Lucy02

Registered User.
Local time
Yesterday, 23:26
Joined
Nov 25, 2005
Messages
36
Hi Guys

I have reports that I complete for 2 employees. I always give the reports an id to show who the employee is and the date of the report e.g

LK 13/02/2006
CR 13/02/2006

How would I create a query so that i could say show me all of the reports for employee LK between the dates of 01/01/2006 and 13/02/2006.

Many thanks in advance!
 
Not sure what your problem is as from a previous thread you know how to handle the dates so just select the employee.
Are you using the design grid or writing SQL, are you driving your queries from a form?

Brian
 
well the reports are entered into a table so the query is from a table. But the ID contains BOTH the employees intials and the date of the report?
 
If you insist on having one field :( the the following SQL should work for you, it prompts for the relevent info.

Code:
SELECT Table2.id, Left([id],InStr([id]," ")-1) AS initials, CDate((Right([id],10))) AS repdate
FROM Table2
WHERE (((Left([id],InStr([id]," ")-1))=[employeeinitials]) AND ((CDate((Right([id],10)))) Between [fromdate] And [todate]));

Brian
 

Users who are viewing this thread

Back
Top Bottom