Article ID: 126941
Article Last Modified on 1/19/2007
Sub MultiLineFilter()
' Creates the filter named "MyFilter" or overwrites it if it already
' exists. Also adds the first line of the filter. The first line will
' read: "ID - grt or equal - 5 - and"
FilterEdit Name:="MyFilter", TaskFilter:=True, create:=True, _
overwriteexisting:=True, FieldName:="id", _
test:="gtr or equal", Value:="5", Operation:="and", _
ShowInMenu:=True
' Creates the second line in the same filter and
' will read: "ID - less or equal - 5"
FilterEdit Name:="MyFilter", TaskFilter:=True, create:=False, _
overwriteexisting:=False, newfieldname:="id", _
test:="less or equal", Value:="5"
End Sub
NOTE: The "create" and "overwriteexisting" arguments are False. The
"NewFieldName" parameter specifies the field name of the next available
line in the filter.
Filter Definition Table.
FilterEdit
Keywords: kbcode kbhowto kbprogramming KB126941