J
JulieD
Hi All
i've a form (Classes) with a subform (Units) - and in the subform is another
subform (Assignments). When the user picks the unit that the student is
going to do, i want to populate the assignments subform with the standard
assignments that are available for that unit and then they can enter due
dates & other information.
i am using the ONENTER event of the assignments subform to run the following
code:
Dim dbs
Dim rst
Dim strsql, txtunit As String
'append assignments relevent to unit into jtbl_ClassAssignment
txtunit = Me![UnitID]
Set dbs = CurrentDb
dbs.Execute = "INSERT INTO jTBL_ClassAssignment ( Assignment, Marks )
SELECT ztbl_Assignment.Assignment, ztbl_Assignment.Marks" _
& " FROM ztbl_Assignment WHERE ztbl_Assignment.unit = '" & txtunit &
"'"
However, i'm getting a run-time error 3251 "Operation is not supported for
this type of object"
and it doesn't work.
Please help.
Regards
JulieD
i've a form (Classes) with a subform (Units) - and in the subform is another
subform (Assignments). When the user picks the unit that the student is
going to do, i want to populate the assignments subform with the standard
assignments that are available for that unit and then they can enter due
dates & other information.
i am using the ONENTER event of the assignments subform to run the following
code:
Dim dbs
Dim rst
Dim strsql, txtunit As String
'append assignments relevent to unit into jtbl_ClassAssignment
txtunit = Me![UnitID]
Set dbs = CurrentDb
dbs.Execute = "INSERT INTO jTBL_ClassAssignment ( Assignment, Marks )
SELECT ztbl_Assignment.Assignment, ztbl_Assignment.Marks" _
& " FROM ztbl_Assignment WHERE ztbl_Assignment.unit = '" & txtunit &
"'"
However, i'm getting a run-time error 3251 "Operation is not supported for
this type of object"
and it doesn't work.
Please help.
Regards
JulieD