the form(inputbox) displayed has two button, OK and CANCEL
if cancel button will pressed the NewValue becomes an empty string value ,else, if I press ok button the NewValue becomes the string that I have put in
now my question is : witch differences are between if I press OK with none value and if I press the cancel button??
Subject: RE: inputbox() differences between return values
ok,I suspected that, but I was not sure…
the problem of your solution is that (in my case) the value inserted in the inputform don’t go to the current document but must go in another document(same form)created and composed with the code…
my code is that one:
Sub Click(Source As Button)
Dim workspace As New NotesUIWorkspace
Dim session As New NotesSession
Dim db As NotesDatabase
Dim doc As NotesDocument
Dim newDoc As NotesDocument
Dim nuovovalore As String
Dim uiNewdoc As NotesUIDocument
Set Session = New NotesSession
Set db = session.CurrentDatabase
Set Currentdoc = workspace.CurrentDocument
Set Doc = Currentdoc.Document
If Not(doc Is Nothing) Then
Set newDoc = db.CreateDocument
newDoc.Form = "Nuovo Formulario PP"
Call doc.CopyAllItems(newdoc)
nuovovalore=Inputbox("Inserisci il nuovo numero materiale:","Nuovo Materiale")
–here I must to check “nuovovalore” and if I press cancel the code must break (exit sub)—
Call newdoc.ReplaceItemValue("materiale",nuovovalore)
Set uiNewdoc = workspace.editDocument(True,newdoc,True)
Call uinewdoc.Reload
End If
Subject: RE: inputbox() differences between return values
yes, I think it’s the best solution, in fact “” is a bad value for materiale… but the user should to view the composed form, also without “materiale”…then before to save he enter “materiale” in his own field.