Dim Filter As String
\' Dim t2 As Table = Tables("main_table1")
\' Dim n As Integer = t2.Rows.Count
With e.Form.Controls("nl1")
If .Value IsNot Nothing Then
If Filter > "" Then
Filter = Filter & " And "
End If
Filter = Filter & "出生日期 >= #" & .Value & "#"
End If
End With
With e.Form.Controls("nl2")
If .Value IsNot Nothing Then
If Filter > "" Then
Filter = Filter & " And "
End If
Filter = Filter & "出生日期 <= #" & .Value & "#"
End If
End With
With e.Form.Controls("combobox2")
If .Value IsNot Nothing Then
If Filter > "" Then
Filter = Filter & " And "
End If
Filter = Filter & "学历 = \'" & .Value & "\'"
End If
End With
With e.Form.Controls("combobox3")
If .Value IsNot Nothing Then
If Filter > "" Then
Filter = Filter & " And "
End If
Filter = Filter & "性别 = \'" & .Value & "\'"
End If
End With
With e.Form.Controls("combobox4")
If .Value IsNot Nothing Then
If Filter > "" Then
Filter = Filter & " And "
End If
Filter = Filter & "所属党组织 = \'" & .Value & "\'"
End If
End With
With e.Form.Controls("combobox1")
If .Value IsNot Nothing Then
If Filter > "" Then
Filter = Filter & " And "
End If
Filter = Filter & "当前身份 = \'" & .Value & "\'"
End If
End With
With e.Form.Controls("combobox5")
If .Value IsNot Nothing Then
If Filter > "" Then
Filter = Filter & " And "
End If
Filter = Filter & "在册状态 = \'" & .Value & "\'"
End If
End With
If filter > "" Then
Tables("main_table1").Filter = Filter
Tables("main_table1").Focus
Else
e.Form.Controls("label20").Text = "数据库中不存在该党员信息, 请更改查询条件!"
End If
请教在窗口的load事件中加载的表,在双击选中的行后,在修改窗口会正常显示选中人员的记录,一旦通过筛选的记录,在双击选中的行后,在修改窗口不会正常显示选中人员的记录,而且表也是会重新加载记录
此主题相关图片如下:1.png