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

Query between dates

P: n/a
I have two tables. One with a list of various dates and other data,
the other with a Period No (1, 2, 3, etc) and then a start and end
date field.

I feel sure it should be fairly easy to do a query which identifies
which period each record is in.

In Excel I would use a Vlookup function, and I've been trying to use
Dlookup, to no success.

Any suggestions would be greatly appreciated.

Thanks
Martin

Mar 12 '07 #1
Share this Question
Share on Google+
2 Replies


P: n/a
You can write something like:

SELECT tblData.relevantField, tblPeriod.periodName FROM tblData,
tblPeriod WHERE tblData.datefield BETWEEN tblPeriod.periodDateStart
AND tblPeriod.periodDateEnd

On Mar 12, 3:10 pm, mkenna...@yahoo.co.uk wrote:
I have two tables. One with a list of various dates and other data,
the other with a Period No (1, 2, 3, etc) and then a start and end
date field.

I feel sure it should be fairly easy to do a query which identifies
which period each record is in.

In Excel I would use a Vlookup function, and I've been trying to use
Dlookup, to no success.

Any suggestions would be greatly appreciated.

Thanks
Martin

Mar 12 '07 #2

P: n/a
That's exactly what I need; I felt sure it wasn't too complicated, but
have been going round in circles for ages trying to work it out!

Many thanks for your help.
Martin

Mar 13 '07 #3

This discussion thread is closed

Replies have been disabled for this discussion.