locked
Creating a DB consulting system RRS feed

  • Question

  • Hi, everyone. First of all, I'm sorry for my english.

    I'm trying to create a DB consulting system. I have a DB called "Products", with the following columns:

    • Products - Where all the product's names are stored;
    • Quantity - Where the product's quantity in stock are stored;
    • Unitary_Value;

    What I want to do is the following:

    1. I have a main form with a comboBox where the user can choose one of the products from the Product column in the DB and a "Submit" button.
    2. When the user press the submit button, it should open another form called "Result" that has a textBox called "Unit_Value" with the unitary value of the selected product.

    I believe that to do that, I should create a Query (Or change the criteria of a existing one) and add it to the record source attribute of the result form.

    Can anyone help me?

    Friday, March 31, 2017 6:41 PM

All replies

  • Hi,

    There's really no need to use two forms. You can add an unbound Combobox on the same forms with all the product details using the Wizard and select the third option.

    Hope it helps...

    • Proposed as answer by Chenchen Li Wednesday, April 19, 2017 7:08 AM
    Friday, March 31, 2017 6:51 PM
  • How many products do you have?

    Is this a real production system or just something you're experimenting/learning with?

    Seems to me there ought to be more columns for real business data and this could be a course exercise.

    It's forum policy to only give general help to students on coursework.

    https://social.technet.microsoft.com/wiki/contents/articles/29181.msdn-forums-asking-questions.aspx#Assignments

    If there are a lot of products then a combo box might not be a great match and filtering could be more appropriate.

    If this is just a prototype for a real world app then you might eventually want to filter on category / price or whatever instead of name.


    Hope that helps.

    Technet articles: WPF: Layout Lab; All my Technet Articles

    • Proposed as answer by Chenchen Li Wednesday, April 19, 2017 7:08 AM
    Sunday, April 2, 2017 10:23 AM
  • I'd urge you to reconsider your information model as the quantity should normally be in an inventory table and not in the product table.

    The same is normally true of pricing (unit_value).  Since prices change over time, normally you create a pricing table for the products with the start and end dates for the price to take effect.


    Daniel Pineault, 2010-2016 Microsoft MVP
    Professional Support: http://www.cardaconsultants.com
    MS Access Tips and Code Samples: http://www.devhut.net


    Sunday, April 2, 2017 12:58 PM