P
phleduc
use of * caracter in rst.Open strSQL
try: strSQL = "SELECT * FROM QrycustomersReport WHERE [cuscompanyName] like
"*test*"
You can use the strSQL to change the recordsource of a form, returns all
company names that include test in their name string.
However when you use the * caracter in an ado statement, the recordset
return no records.
rst.recordcount will always return 0
Any solution for this?
Dim rst As ADODB.Recordset
Set rst = New ADODB.Recordset
rst.ActiveConnection = CurrentProject.Connection
rst.CursorType = adOpenStatic
rst.Open strSQL
MsgBox rst.RecordCount
rst.Close
Set rst = Nothing
try: strSQL = "SELECT * FROM QrycustomersReport WHERE [cuscompanyName] like
"*test*"
You can use the strSQL to change the recordsource of a form, returns all
company names that include test in their name string.
However when you use the * caracter in an ado statement, the recordset
return no records.
rst.recordcount will always return 0
Any solution for this?
Dim rst As ADODB.Recordset
Set rst = New ADODB.Recordset
rst.ActiveConnection = CurrentProject.Connection
rst.CursorType = adOpenStatic
rst.Open strSQL
MsgBox rst.RecordCount
rst.Close
Set rst = Nothing