If the Trim (Text1. Text) & lt;> "" Then
If cb1. Text="number" Then
Strc="select * from dingdan where" & amp; Cb1. Text & amp; "=" & amp; Trim (Text1. Text)
The Else
Strc="select * from dingdan where" & amp; Cb1. Text & amp; "Like '%" & amp; Trim (Text1. Text) & amp; "% '
"End the If
'MsgBox Strc
Call Conndata
Conn. Open
Adob. Open Strc, Conn, 1, 3
If Adob. EOF Then
MsgBox "no actual orderdate!" , 48 + vbOKOnly, "pcbsystem
"The Else
The Set fld4. The DataSource=Adob
End the If
The Else
MsgBox "query data can't be empty", 48 + vbOKOnly, "pcbsystem
"End the If
Database ACCESS, including field file name for the customer, the customer file name inside., -,/such symbols
CodePudding user response:
Try this:If cb1. Text="number" Then
Strc="select * from dingdan where" & amp; Cb1. Text & amp; "='" & amp; Trim (Text1. Text) & amp;" '
"The Else
Strc="select * from dingdan where" & amp; Cb1. Text & amp; "Like '*' & amp; Trim (Text1. Text) & amp; '*'
"End the If
CodePudding user response:
Strc="select * from dingdan where" & amp; Cb1. Text & amp; "=" & amp; Trim (Text1. Text)Strc="select * from dingdan where" & amp; Cb1. Text & amp; "Like '%" & amp; Trim (Text1. Text) & amp; "% '
"
The second query with single quotation marks on both ends of the content, the first why not add?
This code is copied to the?