Combo - If Not in list Open a Form

W

Winters

I have Two Combos The first feeds the second. I am able to use the following
Sql string to open a form on the FIRST combo but can't figure out how to do
it for the second.
Combo1:
SELECT tblSchool.SchoolID, tblSchool.SchoolName FROM tblSchool UNION SELECT
0, "|**Add a NEW School**|" AS Expr1 FROM tblSchool ORDER BY
tblSchool.SchoolName;
Then in the AfterUpdate I open a form if Combo1 = 0 and set the rowsource
for the secodn Combo.

With the second combo being more complex I can't seem to get the "Union
Select 0..." stuff to work. Following is what the rowsource is set to for
Combo2.
I've tried several variations all to no avail. Myabe it can't be done? I
don't know. Can someone please advise. Many Thanks!

Combo2:
"SELECT tblSchoolStaff.StaffID, tblSchoolStaff!FirstName & ' ' &
tblSchoolStaff!LastName AS Expr1" _
& " FROM tblSchoolStaff WHERE (((tblSchoolStaff.SchoolID)=" &
Forms![frmTCCurriculum]![fsubConcEdI].Form![fsubTC_SchoolAndStaff].Form![Combo1]
& "))" _
& " ORDER BY tblSchoolStaff!LastName & ' ' &
tblSchoolStaff!FirstName;"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top