infopath mortgage payment form - InfoPath Dev
in

InfoPath Dev

infopath mortgage payment form

Last post 08-07-2006 11:24 AM by adchaz2. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 08-06-2006 09:36 PM

    infopath mortgage payment form

    hello,

    im just starting to play around with infopath forms. One thing i would like to do is build a simple mortgage payment calculator that i can later use to update some data sources.

    so far i have built the typical form layout with appropriate fields for price interest rate term etc.

    I am stuck on access the document elements with vbscript to make this work

    so far i have the following code for my calculations. however i get stuck at the first line - the error statest that Document and vbmort2 need to be defined. vbmort2 is the name of my infopath form.

    Sub CTRL6_5_OnClick(eventObj)

    Set Calc = Docuemnt.vbmort2
    price = frmCalc.Price.Value
    dnpmt = frmCalc.DownPayment.Value
    prin = price - dnPmt
    intRate = (frmCalc.InterestRate.Value/100) / 12
    term = frmCalc.Term.Value * 12
    pmt = int((prin*intRate)/(1-(1+intRate)^(-1*term))*100)/100
    Calc.Principle.Caption = prin
    Calc.TotalPayments.Caption = term
    Calc.Payment.Caption = pmt
    End Sub

    thank you
  • 08-07-2006 12:34 AM In reply to

    Re: infopath mortgage payment form

    Hi Adchaz2 and welcome to our forum!
    Do you have a simple typo for Document.vbmort2?
    Patrick Halstead
    Project Manager at Qdabra
  • 08-07-2006 11:24 AM In reply to

    Re: infopath mortgage payment form

    hello, and thank you for the quick reply,

    vbmort2 is the name i have saved the infopath template as. I am sure that there is no typo and case is correct.

    I believe the issue is my lack of understanding how to declare/set exatcly what the document name and object location are in regards to the script.

    Using the script in an html page with the table defined works correctly. Somewhere i have messed up on defining the document and object locations.

    If any files should be posted to help resolve this let me know

    thanks again
Page 1 of 1 (3 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.