If CurrentTable.DataTable.Name = "出生" Then \'如果选择的主表
CurrentTable.Cols("单位名称").Combolist = DataTables("出生").GetComboListString("单位名称")
Dim dw As WinForm.ComboBox = e.Form.Controls("单位名称")
Tables("出生").Filter= "单位名称 = \'"& dw.text & "\'"
End If
Dim sd As WinForm.DateTimePicker
Dim ed As WinForm.DateTimePicker
sd = e.Form.Controls("StartDate")
ed = e.Form.Controls("EndDate")
Dim Filter As String
With e.Form.Controls("StartDate")
If .Value IsNot Nothing Then
If Filter >"" Then
Filter = Filter & " And "
End If
Filter = Filter & "子女出生日期 >= #" & .Value & "#"
End If
End With
With e.Form.Controls("EndDate")
If .Value IsNot Nothing Then
If Filter >"" Then
Filter = Filter & " And "
End If
Filter = Filter & "子女出生日期 <= #" & .Value & "#"
End If
End With
Tables("出生").filter = Filter
我设置了单位,一个开始日期,一个结束日期,然后对某个单位进行查询,这个怎么按村查询不了,帮忙改下