hi need help solve error in my qury
in table actvity_name value is "Report mont" but it showing the syntax error(missing oprator)
please help
regards,
jagu147
Code:
Public Sub populate_picks1()
On Error GoTo ErrorHandler
Dim conwatt As ADODB.Connection
Dim Recsetwatt As ADODB.Recordset
Dim strSQL As String
Set conwatt = New ADODB.Connection
Set Recsetwatt = New ADODB.Recordset
strSQL = ""
Call set_path
conwatt.Open "Provider=Microsoft.ACE.OLEDB.12.0;" & _
"Data Source=" & strDatabase_Path & " Database.accdb" & ";"
StrUserWinID = "Tbl_Production"
area = "Report mont"
strSQL = "SELECT distinct(ALS_No) FROM " & StrUserWinID & " where Activity_Name= " & area & " "
Recsetwatt.Open strSQL, conwatt, adOpenDynamic, adLockOptimistic
in table actvity_name value is "Report mont" but it showing the syntax error(missing oprator)
please help
regards,
jagu147
Last edited by a moderator: