G
Guest
I have a database with Classes, Students, Enrollments, etc. tables. I have
form where I want to "assign" each student to a class. The form is based on
the Students table, and I have a subform based on my Enrollements and
Sessions tables.
I have two combo boxes in my subform, one for the class, and one for the
session. When I select a class, I want it to populate the sessions combobox
to the appropriate sessions for the selected class. The cboClass is based on
the Classes table, and the cboDay I have coded in VBA Editor as the following:
cboDay.RowSource = "SELECT Sessions.SessionID, Sessions.Day,
Sessions.ClassID FROM Sessions WHERE Sessions.ClassID = " & cboClass & ";"
When I initially run the program it seems to work, the cboDay is populated
correctly, but when I go into the Sessions table, my form has inserted a
random number in the Day field.
It's not just taking what I have in the Session table for the Day value,
it's inserting a new record. Why is this???
- ivalum21
form where I want to "assign" each student to a class. The form is based on
the Students table, and I have a subform based on my Enrollements and
Sessions tables.
I have two combo boxes in my subform, one for the class, and one for the
session. When I select a class, I want it to populate the sessions combobox
to the appropriate sessions for the selected class. The cboClass is based on
the Classes table, and the cboDay I have coded in VBA Editor as the following:
cboDay.RowSource = "SELECT Sessions.SessionID, Sessions.Day,
Sessions.ClassID FROM Sessions WHERE Sessions.ClassID = " & cboClass & ";"
When I initially run the program it seems to work, the cboDay is populated
correctly, but when I go into the Sessions table, my form has inserted a
random number in the Day field.
It's not just taking what I have in the Session table for the Day value,
it's inserting a new record. Why is this???
- ivalum21