I am using a datacontrol to connect to a DBIII database
and display the contents in Flexguid (VB6)
I can find exact matches no problem.
When I use LIKE in the query no records are returned.
Is the problem that the database is a DBIII data base.
This code works fine with an Access database, with either exact or partial matches.
Only exact matches are found when the data control is connected
to a DBIII database.
If Me.optDwgNo = True Then
.RecordSource = "select * from morder where drawing like '%" & SearchText & "%' order by shipdate asc "
If .Recordset.RecordCount > 0 Then
msg = MsgBox("No Records found", vbInformation, "Attention")
When this query runs the message box message is displayed.
If that doesn't work, DBIII may use a non-standard character for the wildcard character (as MS Access did use internally) - try using the asteriks (*) as the wildcard character.
.RecordSource = "select * from morder where drawing like '*" & SearchText & "*' order by shipdate asc "
Last edited by loquin; 03-25-09 at 14:36.
"Lisa, in this house, we obey the laws of thermodynamics!" - Homer Simpson
"I have my standards. They may be low, but I have them!" - Bette Middler
"It's a book about a Spanish guy named Manual. You should read it." - Dilbert