I have three tables (SkillList), (SubSkillList), and (SubSkillList2) to populate 3 combo boxes - cboSkillList, cboSubSkillList and cbosubSkillList2. I want each limited by the proceeding. The first works fine (SubSkillList) IS limited by (SkillList). I'm unable to get the third to return a value. It's returning...
Syntax error (missing operator) in query expression '[SubSkillID] = Class A'
where "Class A" is the text of the selected value in the table (SubSkillList) - can't determine where it's failing (?) Any guidance is appreciated!!
Code as follows:
Private Sub cboSkillList_AfterUpdate()
With Me![cboSubSkillList]
If IsNull(Me!cboSkillList) Then
.RowSource = ""
Else
.RowSource = "SELECT [SubSkill] " & _
"FROM SubSkillList " & _
"WHERE [SkillID]=" & Me!cboSkillList
End If
Call .Requery
End With
End Sub
Private Sub cbosubSkillList_AfterUpdate()
With Me![cboSubSkillList2]
If IsNull(Me!cboSubSkillList) Then
.RowSource = ""
Else
.RowSource = "SELECT [SubSkill2] " & _
"FROM SubSkillList2 " & _
"WHERE [subSkillID]=" & Me!cboSubSkillList
End If
Call .Requery
End With
End Sub