D
DellaCroce
I have a strange situation. I create a select statement behind a form.
that looks something like this:
Dim rs As New ADODB.Recordset
Dim dbJob As Connection
Set dbJob = CurrentProject.Connection
.....
ls_SQL = "Select * from [Action Item] where [Action Item].[Originator] Like
('*G*')"
ls_SQL = ls_SQL + " Order by Ainumber"
rs.Open ls_SQL, dbJob
The record set always comes back empty. I tested the select statement in a
query, and it come up with the correct records. I then tested the select
statement with a where clause that did not use the LIKE operator, and it
selects records correctly. But anytime I use the LIKE operator in the
statement, it comes up with no records.
1. I have check spelling on table and field names - they are correct
2. I have tried using other fields in the Where LIKE clause - they do not
come up with records.
3. I am using Access 2000 on a Win XP machine.
Can anyone point me towards a possible place to look for the error?
Thanks
that looks something like this:
Dim rs As New ADODB.Recordset
Dim dbJob As Connection
Set dbJob = CurrentProject.Connection
.....
ls_SQL = "Select * from [Action Item] where [Action Item].[Originator] Like
('*G*')"
ls_SQL = ls_SQL + " Order by Ainumber"
rs.Open ls_SQL, dbJob
The record set always comes back empty. I tested the select statement in a
query, and it come up with the correct records. I then tested the select
statement with a where clause that did not use the LIKE operator, and it
selects records correctly. But anytime I use the LIKE operator in the
statement, it comes up with no records.
1. I have check spelling on table and field names - they are correct
2. I have tried using other fields in the Where LIKE clause - they do not
come up with records.
3. I am using Access 2000 on a Win XP machine.
Can anyone point me towards a possible place to look for the error?
Thanks