rich.barry
Registered User.
- Local time
- Today, 04:11
- Joined
- Aug 19, 2001
- Messages
- 176
I am having an issue with a select statement containing a LIKE clause where the record set returned is empty, but if I Debug.Print the select statement and copy it to the SQL view of a query and run it there, then it returns a ful set of records.
Record.Open "SELECT * FROM qryVeneerWidths WHERE ((qryVeneerWidths.GradingRule) Like '" & [Forms]![frmDateTime]![cboDefault] & "*" & "')", db, adOpenKeyset, adLockOptimistic
In a query both of these return records
SELECT * FROM qryVeneerWidths WHERE ((qryVeneerWidths.GradingRule) Like '*')
SELECT * FROM qryVeneerWidths
In code, as a record set, only the second one does.
Can any one tell me what the problem with the LIKE statement in the recordset Select clause is.
Thanks
Richard
Record.Open "SELECT * FROM qryVeneerWidths WHERE ((qryVeneerWidths.GradingRule) Like '" & [Forms]![frmDateTime]![cboDefault] & "*" & "')", db, adOpenKeyset, adLockOptimistic
In a query both of these return records
SELECT * FROM qryVeneerWidths WHERE ((qryVeneerWidths.GradingRule) Like '*')
SELECT * FROM qryVeneerWidths
In code, as a record set, only the second one does.
Can any one tell me what the problem with the LIKE statement in the recordset Select clause is.
Thanks
Richard