RE: Add record programmatically with values from two recordsources



Wouldn't the student have to be enrolled in the class to show up as, you
know, someone enrolled in the class?

"PJ Von" wrote:

My form uses three underlying tables: Classes, Students and a linking table
called StudentClassRegistrations, which stores the primary key for the
student and the class. I want to add a record to StudentClassRegistrations
based on the values selected in the form’s two combo boxes (The form’s
recordsource is set to Classes).

The first combo box allows the user to select a class (after which a subform
displays all students enrolled in that class.)

The second combo box allows the user to select the student to enroll.

I want to build an “Enroll Selected Student” command button that adds a
record to StudentClassesRegistrations, but have no idea how to accomplish
this via code. Any help will be enormously appreciated.

--
PJ Von
.