0

I already ask "How to move documents from the original NSF to another NSF?"

(Domino Notes)How to move documents from the original NSF to another NSF?

Now, I still want to ask "How to move the document back to the original NSF?"


I want to make the form that can be moved back to the original database, but there is an error in the command, and cannot be moved back.

The following instructions are written in the buttons of the NOTES form.

How can I modify them?

Sub Click(Source As Button)
    Dim ws As New notesuiworkspace
    Dim uipr As NotesUIDocument
    Dim ask_me As Variant
    Set uipr = ws.CurrentDocument

    data(0) = "Back original NSF"
    data(1) = "Non-person case"
    ask_me = ws.Prompt(PROMPT_OKCANCELEDITCOMBO,"Reset Reason","Choose a reason...",data(0),data())
    If ask_me = False Then Exit Sub
    If uipr.editmode=False Then uipr.editmode=True
    If ask_me = data(0) Then
        Dim achiveDB As New NotesDatabase("fcpnotesM" , "EFA00B7.nsf")
        Dim doc As NotesDocument
        Set doc = uipr.Document
        Call ChangeField
        Msgbox "Change field OK"
        Call doc.CopyToDatabase(achiveDB)
        Msgbox "Copy success"
        Call doc.Remove(True)
        Msgbox "Move success"
    End If
End Sub
Ariel
  • 57
  • 6

1 Answers1

1

uipr seems to be used before it's defined/asigned

If uipr.editmode=False Then uipr.editmode=True //used here
If ask_me = data(0) Then
    Dim achiveDB As New NotesDatabase("fcpnotesM" , "EFA00B7.nsf")
    Dim uipr As NotesUIDocument //defined here, but no asignment
J Mers
  • 67
  • 6