H
Hindsey
Below is my code. I have a form that has a field named [Criteria] and a
button that when clicked creates a new recordset and sets the form to use the
recordset:
Dim rsCodes As ADODB.Recordset
Set rsCodes = New ADODB.Recordset
sSQL = "SELECT * FROM tabCodeIncidentType Where [Description] Like
'Fire*'"
rsCodes.Open sSQL, CurrentProject.Connection, adOpenKeyset,
adLockOptimistic
Set Forms("frmLookupCodes").Recordset = rsCodes
When I click the button to run this code, all of the records on the form go
away (I originally opened the form without any criteria and displayed all the
records. I am wondering what is wrong with my code. If I remove the * after
'Fire, then it does bring up a record that contains only the word Fire in the
description field. However, that goes away when the * is put in.
Any help?
button that when clicked creates a new recordset and sets the form to use the
recordset:
Dim rsCodes As ADODB.Recordset
Set rsCodes = New ADODB.Recordset
sSQL = "SELECT * FROM tabCodeIncidentType Where [Description] Like
'Fire*'"
rsCodes.Open sSQL, CurrentProject.Connection, adOpenKeyset,
adLockOptimistic
Set Forms("frmLookupCodes").Recordset = rsCodes
When I click the button to run this code, all of the records on the form go
away (I originally opened the form without any criteria and displayed all the
records. I am wondering what is wrong with my code. If I remove the * after
'Fire, then it does bring up a record that contains only the word Fire in the
description field. However, that goes away when the * is put in.
Any help?