[attach]40874[/attach]
[attach]40875[/attach]作者: todaynew 时间: 2009-12-19 19:29
大体如下:
dim str as string
if nz(me.上限.value,0)>0 then
str="出租价格>=" & nz(me.下限.value,0) & " and 出租价格<=" & me.上限.value
else
str="出租价格>=" & nz(me.下限.value,0)
end if
if nz(me.朝向.value,"")<>"" then
str=str & " and 房屋朝向='" & me.朝向.value & "'"
else
str=str & " and 房屋朝向='*'"
end if
Me.Form.Filter = str
Me.Form.FilterOn = True作者: yxf614 时间: 2009-12-19 19:51 2#todaynew
Private Sub Command73_Click()
Dim str As String
If Nz(Me.Text66.Value, 0) > 0 Then
str = "出租价格>=" & Nz(Me.Text69.Value, 0) & " and 出租价格<=" & Me.Text66.Value
Else
str = "出租价格>=" & Nz(Me.Text69.Value, 0)
End If
If Nz(Me.Text71.Value, "") <> "" Then
str = str & " and 房屋朝向='" & Me.Text71.Value & "'"
Else
str = str & " and 房屋朝向='*'"
End If
Me.Form.Filter = str
Me.Form.FilterOn = True
Private Sub Command73_Click()
Dim str As String
If Nz(Me.Text66.Value, 0) > 0 Then
str = "出租价格>=" & Nz(Me.Text69.Value, 0) & " and 出租价格<=" & Me.Text66.Value
Else
str = "出租价格>=" & Nz(Me.Text69.Value, 0)
End If
If Nz(Me.Text71.Value, "") <> "" Then
str = str & " and 房屋朝向='" & Me.Text71.Value & "'"
Else
str = str & " and 房屋朝向='*'"
End If
str=Me.列表框.RecordSource & " where " & str
Me.列表框.RecordSource=str
Me.列表框.Requery
End Sub作者: yxf614 时间: 2009-12-20 11:27 14#todaynew