Hi all. I'm trying to query my access database from outlook vba. I wrote a very basic query in access that works, and copied in the sql to access. I get a "syntax error in from clause" on the last line below. Here's what I've got:
Any ideas? As always thanks in advance...
Kevin
Code:
'Get the symbol from the database.
str = "SELECT tblSymbolsMain.Symbol FROM tblSymbolsMain WHERE (((tblSymbolsMain.Company) " & _
"Like '*" & Company & "*'));"
'Open a recordset.
Set rsData2 = New ADODB.Recordset
rsData2.Open str, conn, adOpenKeyset, adLockOptimistic, adCmdTable
Kevin