W
Wayne
Can anyone tell me whats wrong with the following code?
'Start
Dim strSqlSelect4 As String
Dim strSqlOrder4 As String
Dim strSqlWhere4 As String
'Create SQL Query
strSqlSelect4 = "SELECT Colour " & _
"FROM [PrintingFees] "
'Where
strSqlWhere4 = " WHERE [PrintingFees].Plotter =" _
& [Forms]![PlotSelect]![Plotter] & _
" AND [PrintingFees].Paper =" _
& [Forms]![PlotSelect]![Paper]
'Order by
strSqlOrder4 = " ORDER BY Colour DESC"
'Put strings together to form complete statement
Me!Colour.RowSource = strSqlSelect4 &
strSqlWhere4 & strSqlOrder4 & ";"
I think there's a syntax problem somewhere in the WHERE
clause but i dont know how to fix it.
Thanks
'Start
Dim strSqlSelect4 As String
Dim strSqlOrder4 As String
Dim strSqlWhere4 As String
'Create SQL Query
strSqlSelect4 = "SELECT Colour " & _
"FROM [PrintingFees] "
'Where
strSqlWhere4 = " WHERE [PrintingFees].Plotter =" _
& [Forms]![PlotSelect]![Plotter] & _
" AND [PrintingFees].Paper =" _
& [Forms]![PlotSelect]![Paper]
'Order by
strSqlOrder4 = " ORDER BY Colour DESC"
'Put strings together to form complete statement
Me!Colour.RowSource = strSqlSelect4 &
strSqlWhere4 & strSqlOrder4 & ";"
I think there's a syntax problem somewhere in the WHERE
clause but i dont know how to fix it.
Thanks