Public Sub CHANGE_APPEAL(oRec As IBBDataObject)
' Allows an appeal to be re-activated when adjusting an old gift.
' Also usable at other times during gift entry
    If Not (TypeOf oRec Is CGift) Then
        MsgBox "This works for Gifts only"
        Exit Sub
    End If

    Dim ogift As CGift
    Set ogift = oRec

    Dim oForm As CAppealForm
    Set oForm = New CAppealForm
    oForm.Init REApplication.SessionContext

    Dim tmp_appeal As CAppeal
    Set tmp_appeal = New CAppeal

    If ogift.Appeals.count <> 0 Then
        tmp_appeal = ogift.Appeals.Item(1).Appeal
    Else
        MsgBox "Gift does not have an appeal."
        Set tmp_appeal = WIBR.ShowSearchScreen(SEARCH_APPEAL)
    End If

    If Not tmp_appeal Is Nothing Then
        Set oForm.AppealObject = tmp_appeal
        oForm.ShowForm True
    End If
    
    oForm.CloseDown
    Set oForm = Nothing

End Sub
