G
Guest
Hello there,
I am using Access 2003 (11.5614.5606) with Microsoft XP Professional.
I have gone over and over the strsql2 string but cannot figure out what is
wrong, see error below.
This sub is intended to use the selected combo box Item to filter by
selected customer name,
in which the output will be used to create a chart.
Private Sub Combo36_BeforeUpdate(Cancel As Integer)
Dim dbs2 As DAO.Database
Dim qdf2 As DAO.QueryDef
Dim rs2 As Recordset
Dim strsql2 As String
Set dbs2 = CurrentDb
strsql2 = "SELECT * FROM RecyHistory WHERE CompanyName" _
& " = " & Forms![test form]!Combo36 & ";"
Set qdf2 = dbs2.CreateQueryDef("", strsql2) 'runtime error 3075
'missing operator in query expression Company name = TEST'
Set rs2 = qdf2.OpenRecordset
rs2.Close
End Sub
Thank you
Paul
I am using Access 2003 (11.5614.5606) with Microsoft XP Professional.
I have gone over and over the strsql2 string but cannot figure out what is
wrong, see error below.
This sub is intended to use the selected combo box Item to filter by
selected customer name,
in which the output will be used to create a chart.
Private Sub Combo36_BeforeUpdate(Cancel As Integer)
Dim dbs2 As DAO.Database
Dim qdf2 As DAO.QueryDef
Dim rs2 As Recordset
Dim strsql2 As String
Set dbs2 = CurrentDb
strsql2 = "SELECT * FROM RecyHistory WHERE CompanyName" _
& " = " & Forms![test form]!Combo36 & ";"
Set qdf2 = dbs2.CreateQueryDef("", strsql2) 'runtime error 3075
'missing operator in query expression Company name = TEST'
Set rs2 = qdf2.OpenRecordset
rs2.Close
End Sub
Thank you
Paul