Hi
I have the below query to retrieve dates from a form named frmCaseHearingDatesRange to populate a query named QryPARAMCasesListedRangeFORM
Code:
SELECT QryCounselCaseLatestStage.counselName, QryCounselCaseLatestStage.partyNames, QryCounselCaseLatestStage.[Next Date], QryCounselCaseLatestStage.caseStage, QryCounselCaseLatestStage.remarks
FROM QryCounselCaseLatestStage
WHERE (((QryCounselCaseLatestStage.[Next Date]) Between [Forms]![frmCaseHearingDatesRange]![DTPDateOfHgFrom] And [Forms]![frmCaseHearingDatesRange]![DTPDateOfHgTo]));
The above code has two problems:
  • if the dates are diff it does not pick up the records from the From date
  • if the dates are same in both the DTPs no record is displayed

Could someone help..