By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
464,588 Members | 1,084 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 464,588 IT Pros & Developers. It's quick & easy.

Query question: to pick up a month between two dates

P: 1
Is it possible in Access Query, if yes how i do?

Suppose i have 10 of employees at my organization and they join my organization on different dates. so they have employment start date and employement end date. can i get list of staff for specific month who are present in my organization. For example

S/N EmpStartDate EmpEndDate
1. 1-jan-07 31-july-07
2. 10-feb-07 31-aug-07
3. 12-feb-07 21-nov-07
4. 3-mar-07 31-aug-07
5. 4-jan-07 26-aug-07
6. 1-mar-07 30-jun-07
7. 1-jan-07 31-july-07
8. 1-mar-07 31-july-07
9. 1-may-07 31-oct-07
10. 1-jan-07 31-oct-07

now i want a query which give me the list of employee who are present at feb which is 1, 2, 3, 5,7, and 10th record.

how can i do? please cooperate.

best regards
May 29 '07 #1
Share this Question
Share on Google+
1 Reply

P: 8
I suppose you could use an SQL statement.. something like:

SELECT * FROM MyTable WHERE (DateCol BETWEEN #" & EmpStartDate & "# AND #" EmpEndDate & "#")

Where DateCol refers to the table column listing the date-values.
And then do a loop to add the numbers for each entry.
May 29 '07 #2

Post your reply

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