Solved

Carrying forward

Posted on 2004-09-08
8
333 Views
Last Modified: 2013-12-18
I have a form which is completed and contains address info, after the user completes the form, they complete the same form again with new info. One thing that does not always change is the address. I want the address to carry forward to the new form. I have this code but am not having any luck.

      Dim uidoc As NotesUIDocument
      
      Dim doc, newdoc As NotesDocument
      
      Set uidoc=ws.CurrentDocument
      Set db = sess.CurrentDatabase
      Set doc= uidoc.Document
      
      
      Set newdoc = db.CreateDocument
      
      newdoc.Form = "ibpc_order_form2"
      newdoc.new_contact = doc.new_contact
      newdoc.new_ddress = doc.new_address
      newdoc.new_city = doc.new_city
      newdoc.new_state = doc.new_state
      newdoc.new_zip = doc.new_zip
      newdoc.new_phone = doc.new_phone
      newdoc.new_ccc = doc.new_ccc
      
      Call newdoc.save(True, False)
      
      Call ws.ComposeDocument ( "", "", "ibpc_order_form2" )
End Sub
0
Comment
Question by:jforget1
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
  • 2
  • +2
8 Comments
 
LVL 19

Expert Comment

by:RanjeetRain
ID: 12009602
Set the "Formulas Inherit Values from selected document" chckbox in the property sheet.
0
 
LVL 14

Expert Comment

by:p_partha
ID: 12009619
you cannot do it by the way u are thinking, either you can use a dialog box where he fills up the form and closes it or just have the complete info in the same form , or the last case u can use environment variables or profile documents

Partha
0
 
LVL 19

Expert Comment

by:RanjeetRain
ID: 12009626
When you compose a new document from a UI class, you have the option of inheriting values. Domino has designed the "Formulas Inherit Values from selected document" exactly for this purpose. You may find this property on the second tab of Form property sheet.
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 24

Accepted Solution

by:
HemanthaKumar earned 250 total points
ID: 12009631
Instead of this line
> Call ws.ComposeDocument ( "", "", "ibpc_order_form2" )


Use this one

ws.EditDocument true, newdoc



~Hemanth
0
 

Author Comment

by:jforget1
ID: 12009680
Thanks for the help Hemanth, you always come through
0
 
LVL 14

Expert Comment

by:p_partha
ID: 12009685
Hemanth,
I didn't see that he is composing the same form which he is creating , Good Show !

Partha
0
 
LVL 24

Expert Comment

by:HemanthaKumar
ID: 12009805
Probably as Sjef mentioned you are still in 7th heaven ;-)

Come down to earth ..
0
 
LVL 46

Expert Comment

by:Sjef Bosman
ID: 12013743
LOL

One warning jforget1: if you think that
>     Dim doc, newdoc As NotesDocument
declares two NotesDocument variables, then you're wrong. The variable doc will be of type Variant. Why? It's Notes...

To properly declare two NotesDcouemtns on one line, you have to use
     Dim doc As NotesDocument, newdoc As NotesDocument
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Problem "Can you help me recover my changes?  I double-clicked the attachment, made changes, and then hit Save before closing it.  But when I try to re-open it, my changes are missing!"    Solution This solution opens the Outlook Secure Temp Fold…
Notes Document Link used by IBM Notes is a link file which aids in the sharing of links to documents in email and webpages. The posts describe the importance and steps to create a Lotus Notes NDL file in brief.
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…
This video shows how to use Hyena, from SystemTools Software, to update 100 user accounts from an external text file. View in 1080p for best video quality.
Suggested Courses

738 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question