I'm trying to adjust the rowsource of a combo box based on a few variables that I've made.
Code:
Dim strSQL As String
strSQL = _
"SELECT dbo_tblJobInfo.JobNum, dbo_tblJobInfo.Cstmr1, dbo_tblJobInfo.Sales, dbo_tblJobInfo.FabLoc, dbo_tblJobInfo.JobName, dbo_tblJobInfo.JobAddr, dbo_tblJobInfo.JobCity, dbo_tblJobInfo.JobZip, dbo_tblJobInfo.PrimCont, dbo_tblJobInfo.PrimContPhone, dbo_tblJobInfo.PrimContEmail, dbo_tblJobInfo.BillType, dbo_tblJobInfo.Detlr1, dbo_tblJobInfo.DetDBID " & _
"FROM dbo_tblJobInfo " & _
"WHERE dbo_tblJobInfo.DetDBID = '" & strDetDBID & "' OR dbo_tblJobInfo.FabLoc = lngFabDBID1 OR dbo_tblJobInfo.FabLoc = lngFabDBID2 OR dbo_tblJobInfo.FabLoc = lngFabDBID3 OR dbo_tblJobInfo.FabLoc = lngFabDBID4 OR dbo_tblJobInfo.FabLoc = lngFabDBID5 ;"
Me.cboJobNum.RowSource = strSQL
the string variable is working fine (strDetDBID) but I can't get the long variables (lngFabDBIDx) to work and I'm pretty sure it's just due to a syntax error that I can't seem to figure out. I've tried a couple of different ways. Any suggestions?