Private Function slfStartFilter() 'test
Dim cnt As Integer
cnt = 0
If Me.机种名 <> "" Then
srhKey = "[机种名] like '" & Me.机种名 & "'"
cnt = cnt + 1
End If
If Me.机种No <> "" Then
If cnt > 0 Then srhKey = srhKey & " and "
srhKey = srhKey & "[机种No] like '" & Me.机种No & "'"
cnt = cnt + 1
End If
If Me.YXJ_No <> "" Then
If cnt > 0 Then srhKey = srhKey & " and "
srhKey = srhKey & "[YXJ_No] like '" & Me.YXJ_No & "'"
cnt = cnt + 1
End If
If Me.配置123 <> "" Then
If cnt > 0 Then srhKey = srhKey & " and "
srhKey = srhKey & "[配置123] like '" & Me.配置123 & "'"
cnt = cnt + 1
End If
DoCmd.OpenForm "F_配给清单"
End Function
---------------------------------
以上 机种名,机种No,YXJ_No,配置123 是数据库中的字段,也是查询项中的控件名,问题在于当YXJ_No和配置123有值时的查询,就会弹出一个参数输入框,其他的不会,请问怎么回事?