Please Help!!!
I am trying to use a wild card in code but am unable to do so.... The three Access books
and online info says I can BUT....
I am using a laptop with Windows 7 and Access 2007.
I can open a file, and a Query, and an SQL statement - No problem. BUT as soon as I
add a wild card in it I can no longer open the Query or run the SQL statement.
My code is
code block/
Dim CurConn As New ADODB.Connection
Dim rst As New ADODB.Recordset
Set CurConn = CurrentProject.Connection
Dim SqlStr As String
SqlStr = ("SELECT Description FROM tblDay WHERE Description Like 'Online Banking transfer from
CHK 2612 Confirmation# 5397372507'") '== (Works)
SqlStr = ("SELECT Description FROM tblDay WHERE Description Like 'Online*'") '== (Does not)
rst.Open SqlStr, CurConn, adOpenKeyset, adLockOptimistic, adCmdText
End Code Block/
As is with the * I do not get an error - But I niether get any results???
I am trying to pull (sort) only some items in a table. Like ALL online transfers.
I hope someone knows how I can use a wild card - Please.
:banghead:
I am trying to use a wild card in code but am unable to do so.... The three Access books
and online info says I can BUT....
I am using a laptop with Windows 7 and Access 2007.
I can open a file, and a Query, and an SQL statement - No problem. BUT as soon as I
add a wild card in it I can no longer open the Query or run the SQL statement.
My code is
code block/
Dim CurConn As New ADODB.Connection
Dim rst As New ADODB.Recordset
Set CurConn = CurrentProject.Connection
Dim SqlStr As String
SqlStr = ("SELECT Description FROM tblDay WHERE Description Like 'Online Banking transfer from
CHK 2612 Confirmation# 5397372507'") '== (Works)
SqlStr = ("SELECT Description FROM tblDay WHERE Description Like 'Online*'") '== (Does not)
rst.Open SqlStr, CurConn, adOpenKeyset, adLockOptimistic, adCmdText
End Code Block/
As is with the * I do not get an error - But I niether get any results???
I am trying to pull (sort) only some items in a table. Like ALL online transfers.
I hope someone knows how I can use a wild card - Please.
:banghead: