Form1 & Form2

i have 2 form say form1 & form2, now i want that if form1 is open in edit mode and some one click action button on it then this form(form1) should get close & form2 should open with prepopuleted values in some fields in it like empID, empName etc. & other fields should left blank to fill up.

how can i make it.

Subject: Form1 & Form2

There are several ways, simplest is probably to use LotusScript.

Create a form action on Form1, label it as you please, and call an agent using @Command([ToolsRunMacro]; “YourAgentName”).

In the agent, you must first decide whether the current document (Form1) should be saved or not.

To save, use Call notesUIDocument.Save

Store all the data you need in variables:

Set doc = uidoc.Document

strEmpID = doc.EmpID(0)

strEmpName = doc.EmpName(0)

etc, etc.

Now close the current document:

Call notesUIDocument.Close

Now create a new document and pre-populate with the data:

Set doc = db.CreateDocument

doc.Form = “Form2”

doc.EmpID = strEmpID

doc.EmpName(0) = strEmpName

etc, etc.

You may need to save before opening:

Call doc.Save(True, False)

Open the new document:

Call notesUIWorkspace.EditDocument(True, doc)

That should do it.