J
JohnB
Hi.
Im having trouble with a cascading combo set up. It works OK but when the
requery runs after the first combo is used, any previous settings made in the
second combo disappear. Im using Access 2002 on XP.
Here is the detail. I have a main form called frmSECStudents and a subform
whose control on the main form is subSECPlacementsSubform. The subform has
two combos, cboSchoolName and cboMentor. I have arranged cboMentor so that it
shows the mentor surname, a text field beside it shows the forename. In the
row source for cboMentor I have put the following code as criteria for the
SchoolID field.
[Forms]![frmSECStudents]![subSECPlacementsSubform]![cboSchoolName]
I have added Me.cboMentor.Requery to the After Update event of cboSchoolName.
As I say, this works fine - I select a School in cboSchoolName and this
correctly filters the Mentors shown in cboMentors and when I choose a Mentor,
the forename appears in the text field and the surname appears in cboMentor.
But when I go to another subform record, and select a school in
cboSchoolName, the mentor surname shown in cboMentor in the first subforms
record disappears, although the Mentor forename still shows. If I set up a
second text field to show the Mentor surname, it correctly shows the surname.
What am I doing wrong? Should I be using combos in a different way? i.e. use
a combo to select Mentors but rely on text fields to view forename and
surname?
Thanks for any help. JohnB
Im having trouble with a cascading combo set up. It works OK but when the
requery runs after the first combo is used, any previous settings made in the
second combo disappear. Im using Access 2002 on XP.
Here is the detail. I have a main form called frmSECStudents and a subform
whose control on the main form is subSECPlacementsSubform. The subform has
two combos, cboSchoolName and cboMentor. I have arranged cboMentor so that it
shows the mentor surname, a text field beside it shows the forename. In the
row source for cboMentor I have put the following code as criteria for the
SchoolID field.
[Forms]![frmSECStudents]![subSECPlacementsSubform]![cboSchoolName]
I have added Me.cboMentor.Requery to the After Update event of cboSchoolName.
As I say, this works fine - I select a School in cboSchoolName and this
correctly filters the Mentors shown in cboMentors and when I choose a Mentor,
the forename appears in the text field and the surname appears in cboMentor.
But when I go to another subform record, and select a school in
cboSchoolName, the mentor surname shown in cboMentor in the first subforms
record disappears, although the Mentor forename still shows. If I set up a
second text field to show the Mentor surname, it correctly shows the surname.
What am I doing wrong? Should I be using combos in a different way? i.e. use
a combo to select Mentors but rely on text fields to view forename and
surname?
Thanks for any help. JohnB