J
JohnB
Hi. Can anyone suggest a modification to the following code please? Its part
of the On Click event of a command button on a form that opens a second form,
frmPlacementsBySchool. This second form has a subform called
frmPlacementsSubform with a combo called cboSubject. (The control source of
cboSubject is a table and the choice of a particular subject puts SubjectID
in a field of the same name in tblPlacements). In addition to the existing
criteria (SchoolID) I want frmPlacementsBySchool to open and show only those
subform records that show "Maths" (which is SubjectID 7) in the combo. How
would I do that? I'm using Access 2002 on XP.
Thanks, JohnB
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frmPlacementsBySchool"
stLinkCriteria = "[SchoolID]=" & Me![SchoolID]
DoCmd.OpenForm stDocName, , , stLinkCriteria
of the On Click event of a command button on a form that opens a second form,
frmPlacementsBySchool. This second form has a subform called
frmPlacementsSubform with a combo called cboSubject. (The control source of
cboSubject is a table and the choice of a particular subject puts SubjectID
in a field of the same name in tblPlacements). In addition to the existing
criteria (SchoolID) I want frmPlacementsBySchool to open and show only those
subform records that show "Maths" (which is SubjectID 7) in the combo. How
would I do that? I'm using Access 2002 on XP.
Thanks, JohnB
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frmPlacementsBySchool"
stLinkCriteria = "[SchoolID]=" & Me![SchoolID]
DoCmd.OpenForm stDocName, , , stLinkCriteria