Forum Moderators: open
Set mainDB = New ADODB.Connection
mainDB.ConnectionString = "File Name=whline.udl;"
mainDB.Open
Set objComm = New ADODB.Command
objComm.ActiveConnection = mainDB
objComm.CommandType = adCmdTable
objComm.CommandText = "SELECT COUNT (*) FROM [Userlist] WHERE [Userlist]![isActive]=yes;"
Set objRec = New ADODB.Recordset
Set objRec.Source = objComm
objRec.Open
I am getting an error "syntax error in from clause" and i cannot understand why. I made sure every thing was in [] that needed to be and no keywords were used, but i still get the error.Any help would be appreciated.
simply remove the brackets around 'Userlist' in the from clause and try again. hope this helps. if not, remove the where clause for testing purposes.