E
Egyptkm
I am creating a student database in which I have a form (displayed as a
continuous form) that lists the terms that the student were enrolled in the
school. Beside each term that the student is enrolled, there is a button
that links to a subform where I want to enter the courses that the student
was enrolled for the corresponding term. I have been unable to successfully
link the "termid" field (numeric field) from the main form to the "termid"
field in the subform. When I click on the subform button beside each of the
terms, the "termid" field in the subform is blank instead of displaying the
corresponding "termid" field from the main form. Below is the coding from
the subform button:
Private Sub CourseEnroll_Click()
On Error GoTo Err_CourseEnroll_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "sfrm2_courses"
DoCmd.OpenForm stDocName, acNormal, , "[termid]=" & Me.termid
Exit_CourseEnroll_Click:
Exit Sub
Err_CourseEnroll_Click:
MsgBox Err.Description
Resume Exit_CourseEnroll_Click
End Sub
Thanks for your help.
-Karen
continuous form) that lists the terms that the student were enrolled in the
school. Beside each term that the student is enrolled, there is a button
that links to a subform where I want to enter the courses that the student
was enrolled for the corresponding term. I have been unable to successfully
link the "termid" field (numeric field) from the main form to the "termid"
field in the subform. When I click on the subform button beside each of the
terms, the "termid" field in the subform is blank instead of displaying the
corresponding "termid" field from the main form. Below is the coding from
the subform button:
Private Sub CourseEnroll_Click()
On Error GoTo Err_CourseEnroll_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "sfrm2_courses"
DoCmd.OpenForm stDocName, acNormal, , "[termid]=" & Me.termid
Exit_CourseEnroll_Click:
Exit Sub
Err_CourseEnroll_Click:
MsgBox Err.Description
Resume Exit_CourseEnroll_Click
End Sub
Thanks for your help.
-Karen