Calculated Query with user "margin" input

Gilfdz

Registered User.
Local time
Today, 08:42
Joined
Sep 18, 2007
Messages
36
Hello,

I have two tables: COSTING and PRICING, both with the following fields:
product name French
packaging
transportation
ddp

I want to create a query so that from a text box in the pricing form the user could enter a desired "margin" (ie. 10%) and the query would replace everything in the pricing table with the data from the costing table multiplied times the margin entered in the text box.

how can i accomplish this???

so far i can update the pricing table with the costing data with a action (update) query, but im still missing how to integrate the user "margin" input. At the same time i have the problem that the query limits the update only to the products that are ALREADY in the pricing table. So it doesn't copy ALL the products from the Costing table.

Thanks,
Gilberto
 
So you have records that are in costing that are not in pricing.

First you will have to append the records that are in costing that are not in pricing to pricing.

To update using user imput you will need to create a form for your margin input. In the Design view of your query you need to reference the form and field like so Forms!FrmTest!Margin in the update to row.
 
Thanks Exodus.

Following your advice I created first an append query to fill up the PRICING table (after deleting its information with code) which also prompted the user to enter the desired margin.

It works great. Thanks again
Gilberto
 

Users who are viewing this thread

Back
Top Bottom