I am getting a 'data type mismatch in criteria expression (error 3464) with the below routine when trying to activate drop down box 'cboColleagues'.
In short, there are two combo boxes of which the second one ('cboColleagues') is not visible until the user activates the first ('cboEditPersonnel'). The following routine is created to feed the second combo box with the data source however the error 3464 message appears.
Private Sub cboEditPersonnel_AfterUpdate()
If cboEditPersonnel = "Add Colleague" Then
sql_get = "SELECT tblContacts.CompleteName, tblContacts.Team FROM tblContacts WHERE [tblContacts].[Team]<>'" & Form_frmStaticDataDepartments01.cboDepartments & "'"
Me.cboColleagues.RowSource = sql_get
cboColleagues.Visible = True
Else
End If
End Sub