Jump to content

Microsoft Access


SebJT

Recommended Posts

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...