G
Glenn52
I am having trouble opening a form based on the value from a cboListBox on
another form.
frmClasses contains detailed information about students and their classes.
The form navigates from record to record as usual.
a cboListBox (cboClassByName) is provided to search for a student name.
cboClassByName contains names of students enrolled in all classes.
many students are enrolled in a number of classes.
before displaying class enrollment detail, the user should see multiple
enrollments for a student, (frmClassSearchList) and be able to select which
enrollment to veiw detail for.
frmClassSearchList is unbound with a lstListBox, the RowSource for which is
qryClassSearchList.
Name is a field in lstListBox.
I have tried many variety of qutoes and brackets around the WHERE condition.
' User inputs or selects a Name to search for.
Function cboClassByName_AfterUpdate()
DoCmd.OpenForm "frmClassSearchList", , , [Name] =
Forms![frmClass]![cboClassByName]
End Function
I also tried;
' User inputs or selects a Name to search for.
Function cboClassByName_AfterUpdate()
TempStr=cboCLassByName
DoCmd.OpenForm "frmClassSearchList", , , [Name] = TempStr
End Function
I have tested TempStr and it properly stores the value of cboCLassByName
Any ideas?
another form.
frmClasses contains detailed information about students and their classes.
The form navigates from record to record as usual.
a cboListBox (cboClassByName) is provided to search for a student name.
cboClassByName contains names of students enrolled in all classes.
many students are enrolled in a number of classes.
before displaying class enrollment detail, the user should see multiple
enrollments for a student, (frmClassSearchList) and be able to select which
enrollment to veiw detail for.
frmClassSearchList is unbound with a lstListBox, the RowSource for which is
qryClassSearchList.
Name is a field in lstListBox.
I have tried many variety of qutoes and brackets around the WHERE condition.
' User inputs or selects a Name to search for.
Function cboClassByName_AfterUpdate()
DoCmd.OpenForm "frmClassSearchList", , , [Name] =
Forms![frmClass]![cboClassByName]
End Function
I also tried;
' User inputs or selects a Name to search for.
Function cboClassByName_AfterUpdate()
TempStr=cboCLassByName
DoCmd.OpenForm "frmClassSearchList", , , [Name] = TempStr
End Function
I have tested TempStr and it properly stores the value of cboCLassByName
Any ideas?