mike60smart
Registered User.
- Local time
- Today, 02:00
- Joined
- Aug 6, 2017
- Messages
- 2,093
Hi Everyone
I have a Form which has an Unbound Control named "CurrYr" to display the Current Year 2025 using the following.
=Right(Date(),4)
I then want to run an Append Query using the Code as follows:
This works just fine and appends the required records.
I then need to update those records to insert the date "01 Jan 2026" into a field named "DateFrom"
How would I construct an Unbound Control using the Control "CurrYr" to display the value of "01 Jan 2026"
Your help appreciated
I have a Form which has an Unbound Control named "CurrYr" to display the Current Year 2025 using the following.
=Right(Date(),4)
I then want to run an Append Query using the Code as follows:
Code:
INSERT INTO tblCurrentPastYears ( YearClassID, StudentID, GradeID, ClassID )
SELECT tblYearClasses.ID, tblStudentDetails.StudentID, tblCurrentPastYears.GradeID, tblCurrentPastYears.ClassID
FROM tblYearClasses LEFT JOIN (tblStudentDetails LEFT JOIN (tblGradeList RIGHT JOIN tblCurrentPastYears ON tblGradeList.GradeListID = tblCurrentPastYears.GradeID) ON tblStudentDetails.StudentID = tblCurrentPastYears.StudentID) ON tblYearClasses.ID = tblStudentDetails.YearClassID
WHERE (((tblGradeList.GradeList)="Prep") AND ((tblStudentDetails.Active)=True))
ORDER BY tblGradeList.GradeList;
I then need to update those records to insert the date "01 Jan 2026" into a field named "DateFrom"
How would I construct an Unbound Control using the Control "CurrYr" to display the value of "01 Jan 2026"
Your help appreciated