Sum fields in single record

N

Norwegian

I'm constructing a system for selling materials and services. One record in
the database represents one sale. I'd like to do the following:

Sum=(([price1]*[amount])+([price2]+[price3]+[price4]....[pricen])) and get
the grand total in a field that represents the grand total of the sale in
each spesific record.
So far I've tried to enter the above formula directly into the controlsource
field in the property menu for the field that represents the grand total of
the sale, but ending up getting the sum of all the records in the grand total
field.

No two sales will amount to the same total, it all depend on how many of the
fields that are filled inn i a specific sale in that specific record.
 
J

John W. Vinson

I'm constructing a system for selling materials and services. One record in
the database represents one sale.

Then your table design IS WRONG.

If you have multiple prices for a sale, then you should - I'd say MUST, in a
relational system - use *two* tables in a one to many relationship.

Each Price should be in *a different record*, not a different field. You can
easily Sum them in a Form or Report footer.

John W. Vinson [MVP]
 

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