SurreyNick
Member
- Local time
- Today, 20:48
- Joined
- Feb 12, 2020
- Messages
- 127
On opening my form I’d like to set the default value of a combo box using the current date as a parameter
The following SQL gives me the value I want but I don’t know how to apply this to the default value for the combo box.
SELECT tblAcademicYears.AcademicYearID
FROM tblAcademicYears
WHERE (((Date() Between [tblAcademicYears]![StartDate] And [tblAcademicYears]![EndDate])=-1));
I have tried creating an expression in the default value box and I have tried using a select statement in the On_Load event of the form but I am not having any success. Can someone point me in the right direction?
Thank you
Nick.
The following SQL gives me the value I want but I don’t know how to apply this to the default value for the combo box.
SELECT tblAcademicYears.AcademicYearID
FROM tblAcademicYears
WHERE (((Date() Between [tblAcademicYears]![StartDate] And [tblAcademicYears]![EndDate])=-1));
I have tried creating an expression in the default value box and I have tried using a select statement in the On_Load event of the form but I am not having any success. Can someone point me in the right direction?
Thank you
Nick.