Compute a total dollar amount on an order form where items use a different form

awinemaster
awinemaster used Ask the Experts™
on
I am working on a back-end note database that will generate a packing slip.  I will be pulling in item documents with a dblookup based on a common order id.  This works ok, but I'd like to calculate the total price of all items.  Is this possible when the total is on one form and the prices are on individual item documents?  I was thinking of an @Sum of a dblookup?
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Commented:
I did the same basic thing on a Notes Database that I created. I had one form that was accepting evaluations for a training session being given by our training dept. The user would answer multiple questions about the training on Form A. As a hidden field on Form A I did a Dblookup to another form that had the passing grade for the subject being taught. There should be no reason that you can't do @Sum command on your second form and bring it into your initial form. In my case I then added all of the line items on Form A and compared it to the passing grade, so that I could create views on passing and failing for our trainers to see if they were doing a good job and getting there ideas across.

Author

Commented:
Thank you I figured it out in the meantime using the same method.  Here's the formula I used.

@Sum(@TextToNumber(@DbLookup("";"";"ItemLU"; Cart_OrderID; 4))) - @Sum(@TextToNumber(@DbLookup("";"";"ItemLU";Cart_OrderID;5)))

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial