Hi
Just wondering how would I construct this SQL string to use inside VBA code:
F_PUPILS.PU_SEQ, tblAcadGrade.AcadYear, tblAcadGrade.FS_Set_Code,
tblAcadGrade.FS_Subject, tblAcadGrade.Autumn, tblAcadGrade.Spring,
tblAcadGrade.Summer, tblPastoralAcad.WiTutor, tblPastoralAcad.SuTutor,
tblPastoralAcad.SpTutor IN tblPastoralAcad ON F_PUPILS.PU_ROLL_NO =
tblPastoralAcad.PU_Roll_No
WHERE (((F_PUPILS.PU_SEQ)=[Forms]![FrmMyTutorGroup]![cmbTutees]))
I'm trying to work on a recordset, so need the SQL to build the set.
Thanks
Wendy
rene.francois@ping.be - 03 Apr 2006 09:14 GMT
Hi Wendy!
Did you tried this:
strSQL = "SELECT F_PUPILS.PU_SEQ, tblAcadGrade.AcadYear,
tblAcadGrade.FS_Set_Code,
tblAcadGrade.FS_Subject, tblAcadGrade.Autumn, tblAcadGrade.Spring,
tblAcadGrade.Summer, tblPastoralAcad.WiTutor, tblPastoralAcad.SuTutor,
tblPastoralAcad.SpTutor IN tblPastoralAcad ON F_PUPILS.PU_ROLL_NO =
tblPastoralAcad.PU_Roll_No
FROM tblAcadGrade
WHERE (((F_PUPILS.PU_SEQ)=[Forms]![FrmMyTutorGroup]![cmbTutees]))"
Moreover, as the field PU_SEQ is from the table F_PUPILS, you need an INNER
JOIN clause to create a relationship between F_PUPILS and tblAcadGrade.
> Hi
> Just wondering how would I construct this SQL string to use inside VBA
[quoted text clipped - 12 lines]
>
> Wendy