Function requires a valid adt argument - Resend. Desperate for any suggestion

One of my users is getting the error message “Function requires a valid adt argument” when he tries to remove a previously blocked entry from his junk mail List. This occurs after clicking the Manage List button, selecting the email address, then click remove followed by OK.

I turned on Lotuscript debug and found that the problem occurs in mailbox function BuildRuleDoc()…see snippet below. Specifically the line with the problem reads:

Call .CopyItem FilterFormulaItem, “$FilterFormula”)

An inspect on FilterFormulaItem reveal that it is Nothing (ie. object reference is empty). So far I have tried compacting, reindexing, refresh design etc and still nothing. Could it be that the calendar profile is corrupt? If so how can that be addressed? Any assistace will be appreciated. Thanks.

Function BuildRuleDoc As Integer

'// we must create a Rule doc with most of the items found in a normal Rule doc

	

	Dim FilterFormulaItem As NotesItem

	'// We need to copy this special field to the Rule doc so the formula can compile properly		

	Set FilterFormulaItem = Me.m_TempDialog.getfirstitem("$FilterFormula")

	If (FilterFormulaItem Is Nothing) Then

		'// if we miss the dialog, we need to get this item from the Profile.

		Set FilterFormulaItem = Me.m_CalProfile.getfirstitem("$FilterFormula")

	End If

	Dim exclude(1) As String

	exclude(0)="D"

	exclude(1)="A"

	

	With Me.m_RuleDoc		

		Call .ReplaceItemValue("Form","Mailrule")

		Call .ReplaceItemValue("ConditionList", "Sender or Internet Domain is in the Blocked Senders List")

		Call .ReplaceItemValue("ActionList", "move to folder Junk Mail")

		Call .ReplaceItemValue("ExcludeFromView",  exclude)

		Call .CopyItem(FilterFormulaItem, "$FilterFormula")

		Call .ReplaceItemValue("KeepPrivate", "1")

		Call .ReplaceItemValue("$NoPurge", "")

		Call .ReplaceItemValue("Enable", "1")

		Call .ReplaceItemValue("PROTECTFROMARCHIVE", "1")

		Call .ReplaceItemValue("OrderNum", FindHighestRule)				

		Call .ReplaceItemValue("ReservedRule","1")

		Call .ReplaceItemValue("RuleType","BU")

		Call .ReplaceItemValue("BlockAddressList","")

		Call .Save(True,True,True)

		Call .putinfolder("Rules")		

	End With

	Call Me.m_RulesView.Refresh

End Function

Subject: Function requires a valid adt argument

Same here. One of my users gets it when they just click OK on the Manage List dialog box without making any changes.

Any help would be appreciated.

Subject: RE: Function requires a valid adt argument

I am getting this error on XP and 2000, client 6.02