1 prob

sougatau

Registered User.
Local time
Today, 21:44
Joined
Jun 17, 2006
Messages
10
in 1 table there are are 3 feilds
folwer_name
no_of_flowers
total_cost


another table (2 fields)
name
price

eg:
name price
rose 15
tulip 20


Now I want o make a form
with 3 fields

folwer_name
no_of_flowers
total_cost


eg: if some one select 'flower_name' 'rose' and quantitly '10' then total_cost = 150

How can I do this ? using query or anything else plz gimme detals
 
Make a FlowerBox field, as a combo box, containing 2 columns (the second one invisible). List the flower names in the first field and the per unit cost in the second.

Make a text field called QuantityBox, to hold whatever quantities the user enters.

In the After Update event of the QuantityBox field, put

[txtTotal] = [FlowerBox].column(1) * [QuantityBox]

The user picks a flower from the first box.
The user enters a quantity into the second box
TxtTotal displays the total amount.
 
thanks for yr reply, but will the value of the'total cost' field be added to the table?
 
If the overall form is linked with the first table (i.e the form has that table as it's underlying data source) and the Control Source of the txtTotal field is the Total_Cost column, then clicking to move to the next record or to close the form should save the values.

That's assuming nothing else has been set up that would prevent this from happening.
 

Users who are viewing this thread

Back
Top Bottom