Solved

Carrying forward

Posted on 2004-09-08
8
328 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
Comment Utility
Set the "Formulas Inherit Values from selected document" chckbox in the property sheet.
0
 
LVL 14

Expert Comment

by:p_partha
Comment Utility
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
Comment Utility
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
 
LVL 24

Accepted Solution

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


Use this one

ws.EditDocument true, newdoc



~Hemanth
0
Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

 

Author Comment

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

Expert Comment

by:p_partha
Comment Utility
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
Comment Utility
Probably as Sjef mentioned you are still in 7th heaven ;-)

Come down to earth ..
0
 
LVL 46

Expert Comment

by:Sjef Bosman
Comment Utility
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

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
For beginners of Lotus Notes user this is important to know about the types of files and their location supported by IBM Notes. Mostly users are unaware about how many file types are created and what their usages are. This Article is fully dedicated…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

762 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now