I've got a function that when you pass a number to it, it returns a name, which works fine.
e.g.
Set RstFunctions = Connect.Execute("SELECT * FROM tblClients WHERE ClientID = " & ClientID)
Now I'm trying to filter it a bit more and say
Set RstFunctions = Connect.Execute("SELECT * FROM tblClients WHERE ClientID = " & ClientID & " AND Active = True")
But this fails with the following error:
Error Type:
(0x80020009)
Exception occurred.
"Active" does exist in the table, and I have tried Active = 0, Active = 1, Active = -1, Active = NO, Active = YES. None of them work either.
Any help will be much appreciated
Cheers
J
e.g.
Set RstFunctions = Connect.Execute("SELECT * FROM tblClients WHERE ClientID = " & ClientID)
Now I'm trying to filter it a bit more and say
Set RstFunctions = Connect.Execute("SELECT * FROM tblClients WHERE ClientID = " & ClientID & " AND Active = True")
But this fails with the following error:
Error Type:
(0x80020009)
Exception occurred.
"Active" does exist in the table, and I have tried Active = 0, Active = 1, Active = -1, Active = NO, Active = YES. None of them work either.
Any help will be much appreciated
Cheers
J