I have a table, tblThursdaysInFiscalYears.
The table has 3 fields - StartDate, EndDate and NbrThursdays.
The StartDate is always 10/1/Year and the EndDate is always 9/30/following Year. A fiscal year.
On a form called frmDateSelector there are 2 text box controls, txtStartDate and txtEndDate.
I have placed an additional text box control, in which I want to use a DLookup function to look at the table and find the number of Thursdays in the fiscal year. I have tried
and
I have also tried using the Between operator.
Should it not work?
Tom
The table has 3 fields - StartDate, EndDate and NbrThursdays.
The StartDate is always 10/1/Year and the EndDate is always 9/30/following Year. A fiscal year.
On a form called frmDateSelector there are 2 text box controls, txtStartDate and txtEndDate.
I have placed an additional text box control, in which I want to use a DLookup function to look at the table and find the number of Thursdays in the fiscal year. I have tried
Code:
=DLookUp("[NbrThursdays]","[tblThursdaysInFiscalYears]","[StartDate]=Forms!frmDateSelector!txtStartDate And [EndDate] =Forms!frmDateSelector!txtEndDate")
Code:
=DLookUp("[NbrThursdays]","[tblThursdaysInFiscalYears]","Forms!frmDateSelector!txtStartDate Between [StartDate] and [EndDate] And [Forms]![frmDateSelector]![txtEndDate] Between [StartDate] and [EndDate]")
I have also tried using the Between operator.
Should it not work?
Tom