Passing variables?

S

SF

Hi,

I have 2 forms, one for product listing (tabular) (product code, Product
description, Qty , unit price and product price calculation) aonther is for
payment (payment form). I have a autokey macro that assign a specific key to
open the payment form. I have difficulty in passing variables (calculated
field such as sum([SubTotal]) to the payment form. The result dose not show
correctly, sometime I have two items in form one with a total of $20, but it
show only the price of the items in Payment form. I think that it is becuase
of the calculated field is calculated after the Payment form is opened.

How could a pass these variables correctly to the second form?

SF
 
W

Wayne-I-M

Hi

Just a simple solution - have an unbound box (header or footer) with the sum
your need on the 1st form and refer to that in the 2nd.
 
K

Ken Sheridan

Rather than passing computed values to the Payments form base it on the
underlying data from which the computed values are derived. You'll find an
example of this in slightly different, though analogous, context to yours in
the sample Northwind database. On the Orders form is a 'Print Invoice'
button which opens a report based on an 'Invoices' query (which joins the
necessary tables and includes an ExtendedPrice computed column), and which is
filtered by another query, 'Invoices Filter' which references the OrderID of
the Orders form's current record to restrict the invoice report to the rows
for that record.

If you can provide more details of the underlying recordsets of the two
forms then we could probably be more categorical in our advice.

Ken Sheridan
Stafford, England
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top