Using notesuiworkspace.editdocument and notesuiworkspace.settargetframe together

dear friends,i have trouble in using notesuiworkspace.editdocument and notesuiworkspace.settargetframe together.

i divide 2 frame in frameset. in left frame, i link to “formA”, and in right frame, i link to “frA”

in “formA”, i use action hotspot.

here is my code for action hotspot:

sub click(Source As Button)

Dim workspace As New NotesUIWorkspace

Dim uidoc As NotesUIDocument

Dim session As New NotesSession

Dim db As NotesDatabase

Dim doc As NotesDocument

Set db = session.CurrentDatabase

Set doc = db.CreateDocument

doc.form = “frA”

doc.field1 = “1”

doc.field2 = “2”

workspace.EditDocument True, doc, False

end sub

in form “frA” i have two field: field1 and field2. that the field always change the value according to the action hotspot

my trouble is: when i click the action hotspot it always create a new window with the title “Untitled”.

i want the title is same like the first time i run “happy birhday”

thanx for answering my question

Subject: using notesuiworkspace.editdocument and notesuiworkspace.settargetframe together

You don’t say what the problem is, but your code is not actually using SetTargetFrame anywhere, so obviously it’s not going to work…

Call workspace.SetTargetFrame(“yourFrameName”)

workspace.EditDocument True, doc, False

Subject: RE: using notesuiworkspace.editdocument and notesuiworkspace.settargetframe together

dear Esther Strom,i have try to add your code to my code. in my left code, when i click the action hotspot. in the right frame of my frameset, it doesn’t appear “frA”

sub click(Source As Button)

Dim workspace As New NotesUIWorkspace

Dim uidoc As NotesUIDocument

Dim session As New NotesSession

Dim db As NotesDatabase

Dim doc As NotesDocument

Set db = session.CurrentDatabase

Set doc = db.CreateDocument

doc.form = “frA”

doc.field1 = “1”

doc.field2 = “2”

workspace.EditDocument True, doc, False

call workspace.Settargetframe(“Leftframe”)

end sub

thanx as answering my question

Subject: RE: using notesuiworkspace.editdocument and notesuiworkspace.settargetframe together

You can also specify a “default target for links in frame” for all objects, in your frame properties. So you have two frames, LEFT and RIGHT, specify in the LEFT properties to open all links in frame RIGHT.

Try this !

Subject: RE: using notesuiworkspace.editdocument and notesuiworkspace.settargetframe together

dear Guillaume Delpierrethanx for the idea, but it doestn’t work

i’m new in lotus notes

i will explain my trouble again.

i have a frameset named “myframeset” and the title “myframe”, that divide into 2 frames.

-the first frame:

name:

type: namedelement in the right tab : form

value:Copy Of frm menu

-the second frame:

name: frContent

type: namedelement in the right tab : page

value:pgWelcome

default target for links in a frame : frContent

in form ----Copy Of frm menu-----

i create a section name : Report

and in the body of section, i type “currentmonth” and “lastmonth”.

after that in currentmonth, i used an action hotspot

sub click

Dim workspace As New NotesUIWorkspace

Dim uidoc As NotesUIDocument

Dim session As New NotesSession

Dim db As NotesDatabase

Dim doc As NotesDocument

Set db = session.CurrentDatabase

Set doc = db.CreateDocument

doc.form = “frReportSpecificmonth&CurrentMonth”

doc.month = format(Month(now))

Call workspace.SetTargetFrame(“frContent”)

workspace.EditDocument True, doc, False

end sub

in last month, i use an action hotspot as same as above, the difference only

doc.month = format(Month(now)-1)

in form --frReportSpecificmonth&CurrentMonth—

i set the form property (in the third tab option, Launch tab: in the bottom of tab, i set frameset “myframeset”. and frame “frContent”).

in that form there is field named “month”

my trouble is when i click “currentmonth”, in “frContent”, there doesn’t appear “frReportSpecificmonth&CurrentMonth” form

thanx for answering my question

Subject: RE: using notesuiworkspace.editdocument and notesuiworkspace.settargetframe together

in your explanation, your first frame does not have a “Default target”, have you forgotten it or its a mistake ?try to put frContent on your firstframe (careful case is sensitive)

try it again and let me know about the result, if it does not work i will try to reproduce the problem