首先,给各位坛友、高人拜个晚年,祝新春快乐,万事如意!
我问到了一个查询代码,做了两个查询,
查询之一:
Dim Filter As String
If e.Form.Controls("ComboBox1").Value IsNot Nothing Then
Filter = e.Form.Controls("ComboBox1").Value
If e.Form.Controls("ComboBox2").Value IsNot Nothing Then
Filter = Filter & "= '" & e.Form.Controls("ComboBox2").Value & "'"
Else
Filter = Filter & " Is Null"
End If
Tables("职工库").Filter = Filter
End If
查询之二:
Dim Filter As String
If e.Form.Controls("ComboBox14").Value IsNot Nothing Then
Filter = e.Form.Controls("ComboBox14").Value
If e.Form.Controls("ComboBox15").Value IsNot Nothing Then
Filter = Filter & "= '" & e.Form.Controls("ComboBox15").Value & "'"
Else
Filter = Filter & " Is Null"
End If
Tables("职工库").Filter = Filter
End If
以及众多与之类似的查询,我想将这些查询的结果合并起来,不知道代码应该怎么写?
在帮助里找到合并多个查询结果一章,里面有语法:
Union(Builder, All)可用
但我还是看不懂,不知道该怎么做?
请教高人解惑,十分感谢!