|
i have a form which will display district_names in combo box(cmbdist), when i select this it will display name_school in combo box(cmbschool), when i select this it will run a query how? i used to do like this but error occuring syntax error in FROM clause.
select sno,name_teacher,division from " & me.cmbdist.text & " where name_school = "[forms]![Form6]![cmbschool].column(0)"; in Query3
and i tried this one also
select sno,name_teacher,division from "[forms][Form6][cmbdist].text" where name_school = "[forms]![Form6]![cmbschool].column(0)"; in Query3
i didnt get
this is my combo box(cmbschool) vba code
Private Sub CMBSCHOOL_Change()
Dim stDocName As String
stDocName = "Query3"
DoCmd.OpenQuery stDocName, acViewPreview, acEdit
End Sub
actually in district table district_names field have(bokaro,dumka,chaibasa) data
these are again tables-for bokaro,dumka,chaibasa data is same as (sno,name_teacher,division). tell me urgent
|