R
Ron
I have a form, frmFaculty that has a listbox that lists all courses
that this faculty member teaches. When they select a course from the
listbox and click a button I want a form to pop up called
frmEnrollment, this form will show all the students that are
registered for this course that was selected. Course that is selected
is known by the scheduleNO. And each student is also associated with a
scheduleNo.
Here is what I have in the Click even of the button to view enrollment.
Dim strselction As String
Dim inti As Integer
strselection = "[Scheduleno]=("
For inti = 0 To (List6.ListCount - 1)
If List6.Selected(inti) Then
strwhere = strselection & "'" & List6.Column(0, inti) & "'" & ")"
MsgBox strwhere
End If
Next inti
DoCmd.OpenForm "frmenrollment", acNormal, , strwhere
And in the debugger if I MOUSE OVER strwhere, it shows [scheduleno=
112553 <---or whatever the actual number that is selected.
so basically I just want to open up frmEnroll for the selected
scheduleno. so if 1112223 is selected I want all 1112223 entries to
come up on the next form.
Any ideas?
Right now I get a error the Openform action was cancelled
that this faculty member teaches. When they select a course from the
listbox and click a button I want a form to pop up called
frmEnrollment, this form will show all the students that are
registered for this course that was selected. Course that is selected
is known by the scheduleNO. And each student is also associated with a
scheduleNo.
Here is what I have in the Click even of the button to view enrollment.
Dim strselction As String
Dim inti As Integer
strselection = "[Scheduleno]=("
For inti = 0 To (List6.ListCount - 1)
If List6.Selected(inti) Then
strwhere = strselection & "'" & List6.Column(0, inti) & "'" & ")"
MsgBox strwhere
End If
Next inti
DoCmd.OpenForm "frmenrollment", acNormal, , strwhere
And in the debugger if I MOUSE OVER strwhere, it shows [scheduleno=
112553 <---or whatever the actual number that is selected.
so basically I just want to open up frmEnroll for the selected
scheduleno. so if 1112223 is selected I want all 1112223 entries to
come up on the next form.
Any ideas?
Right now I get a error the Openform action was cancelled