1 Replies - 211 Views - Last Post: 25 February 2018 - 09:31 AM Rate Topic: -----

#1 jtsbattle   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 25-February 18

Calculating total price using database

Posted 25 February 2018 - 07:36 AM

Hello there!

I'm pretty new to Visual Basic and I'm trying to convert a previously created VBA project into a VB project. It's going well except for the most important thing:

The project allows people to select a snack that they would like to order and it's supposed to show the cheapest option in the end. For example, suppose someone wants to order 4x chips, then the program is supposed to show the cheapest shop where to get that. These shops and their prices are stored in an Access database. If someone says that he/she wants to get 4x product X, then the program should calculate (on the backend) the price of product X at all the shops times 4. On the final page it should then tell the user where this order is the cheapest.

The question is, where and how do I store this temporary data (e.g. 4x ...) and how do I connect that to the right prices?

Okay, this might sound a bit vague but I'm more than happy to answer the necessary questions!

Thank you!

Is This A Good Question/Topic? 0
  • +

Replies To: Calculating total price using database

#2 modi123_1   User is online

  • Suitor #2
  • member icon



Reputation: 14092
  • View blog
  • Posts: 56,461
  • Joined: 12-June 08

Re: Calculating total price using database

Posted 25 February 2018 - 09:31 AM

You can use SQL queries.. Group by shop IDs, and a SUM would help.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1