Can anyone help me.....!

Marcus H

Registered User.
Local time
Today, 23:21
Joined
Nov 29, 2000
Messages
13
I am creating a stock control system using access for a college project. When i tab out of one of my fields (CostPrice) other fields are automatically updated (SellingPrice and SellingPriceVAT). This is by using a simple formmula in visual basic (eg SellingPrice = 25 / 100 * COst Price etc etc). This is fine. I also now have a command button which works out this formula. However if i want to rise my profit level from 25% to 27% i must change this in visual basic...this is also fine. I then tab out of cost price or use my button and the calculations are done. However i have over 300 records on my database. Must i tab out of evey cost price on every record for the new changes to take effect or is there a way of automatically getting it to tab out of every cost price on every record using my original command button?? Sorry this is so longwinded! Many thanks!
 
You could create a form that lets the user enter a profit margin, then hit a button that runs an update query. The update query would rip through the entire table & recalculate all of the SellingPrice and SellingPriceVAT fields.

Or do you only want to change the SellingPrice only when the CostPrice changes? If you have a form that lets the user change CostPrice, you could put your calculation for the SellingPrice and SellingPriceVAT in the After Update event for CostPrice.
 

Users who are viewing this thread

Back
Top Bottom