SebJT Posted September 25, 2006 Report Share Posted September 25, 2006 Hi guys,I am doing a photo shoot at my uni's freshers ball this friday and i am going to be selling prints on site.What i would like is an access form where i can enter the customer details, choose the product and quantity they want and it works out the order total.I have made a form which works with entering customer details and choosing products from a drop down and then entering the quantity.What i dont know how to do is for access to work out the total cost by accociating the product name and with its price and then times it by the quantity.Can anyone help.Thanks,Seb Quote Link to comment Share on other sites More sharing options...
Has anyone seen my shoe? Posted September 25, 2006 Report Share Posted September 25, 2006 I assume you have a field for price and a field for quantity?If so then put in [(whatever the price field is called)]*[(whatever quantity field is called]Actually that only works on reports, you cant do workings in forms can you? Quote Link to comment Share on other sites More sharing options...
Dan Campbell Posted September 25, 2006 Report Share Posted September 25, 2006 Can you attach the access file to a post and we can have a little play? Quote Link to comment Share on other sites More sharing options...
Village Idiot Posted September 26, 2006 Report Share Posted September 26, 2006 First off, you'll need a table with all the products (the ones listed in the drop down list on your form) and the associated price from each product.If you put another text field (called say 'cost') on your form to display the cost (price * quantity) and set its property - Locked = 'Yes'. (Means it is read only I think).Stick a button on your form as well ('Calculate Cost'), make an onClick event and in the VB code you will want something like:cost = price * quantity - where:'cost' is the name of the text field that displays the cost of the order,'price' is the name of the field in the database associated with that particular product,'quantity' is the name of the quantity text field on the form (you'll need to put some validation on this so it is numeric and >0).Like dan_brisa says, it would be better if you could post/upload what you've got so far cos it's really difficult to go from what you've posted, so apologies if you've got this far already or if this is no use to you. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.