Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Carrying forward

Posted on 2004-09-08
8
Medium Priority
?
338 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
  • 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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 24

Accepted Solution

by:
HemanthaKumar earned 1000 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

This is an old article, please see an updated version of this article, located here: http://www.experts-exchange.com/articles/23619/Notes-8-5x-Windows-7-Notes-info-and-tips.html
Sometimes clients can lose connectivity with the Lotus Notes Domino Server, but there's not always an obvious answer as to why it happens.   Read this article to follow one of the first experiences I had with Lotus Notes on a client's machine, my…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
Despite its rising prevalence in the business world, "the cloud" is still misunderstood. Some companies still believe common misconceptions about lack of security in cloud solutions and many misuses of cloud storage options still occur every day. …

885 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