完成的写法
strwhere = ""
If Not IsNull(Me.涨幅开始) Then
If Not IsNull(Me.涨幅截止) Then
strwhere = "([涨幅%]>=" & Me.涨幅开始 & " and [涨幅%]<=" & Me.涨幅截止 & ")"
Else
strwhere = "([涨幅%]>=" & Me.涨幅开始 & ")"
End If
Else
If Not IsNull(Me.涨幅截止) Then
strwhere = "([涨幅%]<=" & Me.涨幅截止 & ")"
Else
strwhere = ""
End If
End If