JasonTheAdams
New member
- Local time
- Today, 04:28
- Joined
- Nov 9, 2013
- Messages
- 8
Greetings!
I have the following sub:
SQL = "SELECT * FROM 'Job Status' WHERE 'Shipped' = true AND 'Closed' = true AND 'Controls ReqD' = true"
For some reason, though, when I run this I'm told that Me.RecordSet has invalid SQL in it. That looks like perfectly valid SQL to me. Someone see something I'm not?
Thanks!
I have the following sub:
Code:
Public Sub FilteredQuery()
Dim Clauses(2) As String
Dim SQL As String
'Add columns here
Call AppendClause(Clauses, 0, Me!chkShipped, "Shipped")
Call AppendClause(Clauses, 1, Me!chkClosed, "Closed")
Call AppendClause(Clauses, 2, Me!chkControl, "Controls ReqD")
SQL = "SELECT * FROM 'Job Status'"
If (UBound(Clauses) <> -1) Then
SQL = SQL + " WHERE " + Join(Clauses, " AND ")
End If
Me.RecordSource = SQL
End Sub
SQL = "SELECT * FROM 'Job Status' WHERE 'Shipped' = true AND 'Closed' = true AND 'Controls ReqD' = true"
For some reason, though, when I run this I'm told that Me.RecordSet has invalid SQL in it. That looks like perfectly valid SQL to me. Someone see something I'm not?
Thanks!