Dim strWhere As String
Dim sdate As Date
strWhere = ""
If Not IsNull(Me.month) Then
strWhere = strWhere & "([month] like '*" & Me.Month & "*') AND "----这里想用交易日期来筛选 例如:[trx_dt] in 起始日期 to 结束日期 . 起始日期和结束日期为文本框。用语句是怎么来表示的,试了半天都没试出来!
End If
If Not IsNull(Me.Trx_type) Then
strWhere = strWhere & "([trx_type] like '*" & Left(Me.Trx_type, 1) & "*') and "
End If
If Not IsNull(Me.wx_no) Then
strWhere = strWhere & "([wx_no] like '*" & Me.wx_no & "*') and "
End If
If Not IsNull(Me.Vend_no) Then
strWhere = strWhere & "([vend_no] like '*" & Me.Vend_no & "*') and "
End If
If Len(strWhere) > 0 Then
strWhere = Left(strWhere, Len(strWhere) - 5)
End If
Me.交易明细_子窗体.Form.Filter = strWhere
Me.交易明细_子窗体.Form.FilterOn = True
[此贴子已经被作者于2006-9-14 14:38:42编辑过]
|