Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Carrying forward

Posted on 2004-09-08
8
Medium Priority
?
337 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 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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

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
IBM Notes offer Encryption feature using which the user can secure its NSF emails or entire database easily. In this section we will discuss about the process to Encrypt Incoming and Outgoing Mails in depth.
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses

688 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