geting values from popup

mohammadagul

PrinceAtif
Local time
Today, 19:59
Joined
Mar 14, 2004
Messages
298
Hi,

I have a small problem here ..

What I have is a An invoice form with a field Called FreightCharges. Now freight Charges can be more than one. So I made another table by the name of FreightCharges with the following field

Invoiceno
Type of Charges
Anmount
Total

I made a continuous form based on the above mentioned fields.

In my invoice form I had placed a button next to freightcharges texbox. When the user click the button the continuouls popup form open for entering the Details.

What I want now is to have the total of all the feight charges in my FreightCharge text box in invoice form.

Presently I am tryint to use the setvalue through macro.. but it is not accespting?

Can anyone tell mehow to do this.
[Edit/Delete Message] [Reply With Quote]
 
Just a note, your total Freight Charge is a calculated value, so you don’t want to save it in the Invoice Table, just display the value that’s calculated on the form.

I have done something similar to your request. In the Subform create a unbound text box (it can be invisible) with the total of the charges. A formula like =Sum(nz([Anmount)), can control source. Then on the main form in your Total Freight Charges text box, make control source call the field on the Subform, like =[FreightSubForm Subform].Form!TotalFreight. This assumes that the field on the subform is called TotalFreight, and the subform is called FreightSubForm.
 
Thankyou very much for your reply....

In the last few days when i had posted this thread no body had responded so i decided that i had to do is of my own... so this is what i have done.

My freight charge field is linked to a separate table with only two fields.

TableName: tblFreight
InvoiceNo
FreightCharge
Total Freight
FormName : frmFreight

with this table i had acreated a tabular form for entring freight charge amount.on double clicking the FreightCharge field in the invoice form a popup form (frmFreight) appears with the above mentioned fields.

on the close even of the the form(frmFreight) i have attached a macro.

MacroName Action
MnuSetvalue setvalue

in the conditions i have placed the name of FreightCharge Field in the invoice form and the totalFreightChare Field name from the frmFreight

this had done the trick. so when ever i want to add freight charges... i just double click the field and popup the form for entering data and on closing i get the total in the invoice form.

simple and easy....


Thanks again for you reply...
 

Users who are viewing this thread

Back
Top Bottom