我有这个代码。但我无法得到任何东西。
SMain_EW = RS.Fields("Main_EW").Value
Dim MyCheck
If SMain_EW Like "*" & Me.Text0 & "*" = True Then
MsgBox "1"
End If
编辑:的 ******************** 我编辑如下:
Do Until RS.EOF
SMainEW = RS.Fields("Main_EW").Value
ST_EW_1 = RS.Fields("T_EW_1").Value
If SMainEW Like "*" & Me.Text0 & "*" Then
strItem1 = "*" & RS.Fields("Main_EW").Value
strItem2 = RS.Fields("T_EW_1").Value
ElseIf ST_EW_1 Like "*" & Me.Text0 & "*" Then
strItem2 = "*" & RS.Fields("T_EW_1").Value
strItem1 = RS.Fields("Main_EW").Value
Else
strItem2 = RS.Fields("T_EW_1").Value
strItem1 = RS.Fields("Main_EW").Value
End If
strItem = strItem1 & ";" _
& strItem2
Me.List122.AddItem strItem
RS.MoveNext
Loop
答案 0 :(得分:0)
尝试删除“= True”部分,这是多余的。它应该只读:
SMain_EW = RS.Fields("Main_EW").Value
Dim MyCheck
If SMain_EW Like "*" & Me.Text0 & "*" Then
MsgBox "1"
End If