G
Guest
Re Access 97:-
I have a table (tblPeriodDates) with the following fields;
PeriodID (number)
StartDate (Date/Time)
EndDate (Date/Time)
In a separate table (tblMain) I have a field;
CRMDate (Date/Time)
I wish to return the PeriodID where the CRMDate falls between the StartDate
& EndDate from tblPeriodDates.
I have created the following column in an Access query;
PeriodNo: DLookUp("PeriodID","tblPeriodDates",[CRMDate] & " Between
[StartDate] And [EndDate]")
A single table (tblMain) is the only table included in the query, which
includes the CRMDate field from this table.
My problem is that the query does not return the correct PeriodID in the
above Dlookup function. I presume I need to convert some of these fields to
some other format perhaps. But having tried various date functions, the
solution still alludes me.
Please help.
Many thanks.
I have a table (tblPeriodDates) with the following fields;
PeriodID (number)
StartDate (Date/Time)
EndDate (Date/Time)
In a separate table (tblMain) I have a field;
CRMDate (Date/Time)
I wish to return the PeriodID where the CRMDate falls between the StartDate
& EndDate from tblPeriodDates.
I have created the following column in an Access query;
PeriodNo: DLookUp("PeriodID","tblPeriodDates",[CRMDate] & " Between
[StartDate] And [EndDate]")
A single table (tblMain) is the only table included in the query, which
includes the CRMDate field from this table.
My problem is that the query does not return the correct PeriodID in the
above Dlookup function. I presume I need to convert some of these fields to
some other format perhaps. But having tried various date functions, the
solution still alludes me.
Please help.
Many thanks.