I have a document open and am using an action button to create a new document (same db, same form) -- copying some fields from the old doc to the new doc. Everything seems to be working just fine -- the original document is closing, the new doc is created and found in the view, but the new document is not coming up in edit mode. Any ideas?
Sub Click(Source As Button)
'create new document, save and close current uidoc
Dim session As New NotesSession
Dim db As NotesDatabase
Dim newdoc As NotesDocument
Set db = session.CurrentDatabase
Set newdoc = db.CreateDocument
newdoc.form = "PeerReview"
newdoc.Title = uidoc.fieldgettext("Title")
newdoc.Form_Status = "New"
newdoc.RequestorName = user$
newdoc.RequestorEMail = uidoc.fieldgettext("RequestorEMail")
unid$=newdoc.UniversalID
newdoc.DocID=unid$
Call uidoc.save
Call uidoc.close
Call newdoc.Save( True, True )
'find the new document and open it
Dim view As NotesView
Set view = db.GetView( "NoID" )
view.refresh
Dim getdoc As NotesDocument
Set getdoc = view.GetDocumentbyKey(unid$)
Call workspace.EditDocument
End Sub

Create new doc with action button a... (judy tate 9.Jul.07)
. . 