Total Cost

Ja (:

Registered User.
Local time
Yesterday, 16:33
Joined
Jan 9, 2007
Messages
17
Well at the moment i'm still in the design stages, but i made a database with test fields to see how it would work out best.

Basically i have to have a form with a drop down list for each type of computer componant and when selected the total price for all the items selected so far needs to show up at the bottom of the form.

Or when a button is pressed the price could be updated, that is fine too!

The way i was planning to do it was having an orders page, in which each field was a lookup to a difference table, one for each componant
Processor; ProcID, Proc name, Proc cost

Anyone have any ideas on the easiest way to load the total value for the items selected? Would be much appreciated! Thanks!
 
Last edited:
A text box with this in the form footer.

=Sum([QtySold)*[Cost])
 
no the page layout will be like this:
49kfa0x.png


You select all the compoants and it has to get the price for each one and make a total.
 
Can you see the costs of the components on the screen? If so then

ComponentCost = me.ProcCost + me.RAMCost + ...
 
Well i was going to make it so that it dropped down and was linked to 3 fields
ProcID ProcName and ProcCost etc

each one would be on a different table but all pulled in together with lookup fields calling all 3 in an orders table

would that code you put be applicable?
 
Ah, well in that case since you have the cost in the Combo box...

Control Source for the component cost would look like:

=([ProcessorComboBox].[Column](2) + [RAMComboBox].[Column](2) + ... + [CDDRIVEComboBox].[Column](2))
 
Ok well damn close now, and i can offically say i love you!

But at the moment when it adds 23 and 25 it puts 2325 any idea why this is?

Thanks so much for the help!
 
Ok well damn close now, and i can offically say i love you!

But at the moment when it adds 23 and 25 it puts 2325 any idea why this is?

Thanks so much for the help!

Sounds like you are combining strings instead of adding currency.

What's the rowsource for the combo boxes?
 
What do you mean by rowsource? sorry
 
SELECT ram.RamID, ram.Ram, ram.RamCost FROM ram;

SELECT proc.ProcID, proc.Proc, proc.ProcCost FROM [proc];

=(Proc.Column(2)+Ram.Column(2))
 
=CCur(Proc.Column(2))+CCur(Ram.Column(2))
 
Thank you so much for your help! means alot!
 

Users who are viewing this thread

Back
Top Bottom