Hello,
I have three tables; tblCourses ,tblCourseElements and tblElementnames
tblCourses contains details such as dates, locations.
tblCourseElements contains the descriptiveID of activities within a course and associates them with a courseID
tblElementnames simply stores the string describing the CourseElement
So, there can be many CourseElements in a Course. (Like, exams in a week, topics covered, group activities, etc).
I have a form for editing the Course, allowing the user to change the details, such as dates and location. Easy.
However, I need it to have a visual way of adding or removing CourseElements.
Now, there are 50 possible elements.
I have a form with 50 checkboxes, named chk1 to 50 - representing the ID of each elementname. (So we can use
to get the ID from the name if necessary).
When the form loads, I need it to get every CourseElement for that course, and set the relevant checkbox to true.
EG. If we edit CourseID = 5
and there are 4 CourseElements for CourseID(5) (say, 6,8,32 and 41)
I need chk6 = true
chk8 = true
chk32 = true
chk41 = true
I've never tried something like this before, so any help appreciated!
I have three tables; tblCourses ,tblCourseElements and tblElementnames
tblCourses contains details such as dates, locations.
tblCourseElements contains the descriptiveID of activities within a course and associates them with a courseID
tblElementnames simply stores the string describing the CourseElement
So, there can be many CourseElements in a Course. (Like, exams in a week, topics covered, group activities, etc).
I have a form for editing the Course, allowing the user to change the details, such as dates and location. Easy.
However, I need it to have a visual way of adding or removing CourseElements.
Now, there are 50 possible elements.
I have a form with 50 checkboxes, named chk1 to 50 - representing the ID of each elementname. (So we can use
Code:
Replace(ctl.Name, "chk", "")
When the form loads, I need it to get every CourseElement for that course, and set the relevant checkbox to true.
EG. If we edit CourseID = 5
and there are 4 CourseElements for CourseID(5) (say, 6,8,32 and 41)
I need chk6 = true
chk8 = true
chk32 = true
chk41 = true
I've never tried something like this before, so any help appreciated!