Results 1 to 7 of 7
  1. #1
    Join Date
    Jun 2012
    Posts
    15

    Unanswered: Need help with creating a form (newbie)

    Hey guys, I've been trying to make a form but with no luck. I'm pretty new to Access so frogive me for simple errors. I think this should be an easy solution though.

    I have three tables- Size, Price, and Upcharge. Simply I need to create a form that lets the user select a size, which automatically fills in the price, and then select an upcharge.
    From there, they insert a name, description and PIN # (on the same form), hit a button, and it creates a table that has all the info in a row, with a column for total price (price + upcharge).

    I've attached the tables and a few things I've been messing around with. Can anyone give me some direction?
    Attached Files Attached Files

  2. #2
    Join Date
    Jun 2012
    Posts
    85
    create a query to have the expression for the price. IE the price gets created automatically. which then is filled into the table. let me know how that works just an idea

    Cheers,
    Mike
    ___________

  3. #3
    Join Date
    Jun 2012
    Posts
    15
    I created a query that gave me the sizes and the prices. When I drag that into my form it just puts it into a chart in my form. How do I make those into selectable drop downs? Thanks!

  4. #4
    Join Date
    Aug 2004
    Location
    Cary, NC
    Posts
    264
    This is the basic concept assuming there is a logical connection between Size, Price, and Upcharge in your database.

    Use the Size Table as the source of the first combo.
    For Price use a saved query that finds Price based on the value of the Size combo
    Do the same for Upcharge using the value of the Price combo

    On the after update event of Size, have it requery the Price combo. Do the same on price to requery Upcharge.

    For now, you can do these with queries built into the database, but the solution is a lot cleaner once you learn how to set dynamic result sets.

    Steve

  5. #5
    Join Date
    Jun 2012
    Posts
    15
    Quote Originally Posted by sps View Post
    This is the basic concept assuming there is a logical connection between Size, Price, and Upcharge in your database.

    Use the Size Table as the source of the first combo.
    For Price use a saved query that finds Price based on the value of the Size combo
    Do the same for Upcharge using the value of the Price combo

    On the after update event of Size, have it requery the Price combo. Do the same on price to requery Upcharge.

    For now, you can do these with queries built into the database, but the solution is a lot cleaner once you learn how to set dynamic result sets.

    I was wondering if you could give me a little more help on how to have the after update event requery the price combo. Any help would be greatly appreciated!

  6. #6
    Join Date
    Aug 2004
    Location
    Cary, NC
    Posts
    264
    Create a query that will become the source for your Pricing combo and set the Row Source of the pricing combo to this query (and Row Source Type to Table/Query)

    Then, assuming that your pricing combo is called cboPricing and your size combo is called cboSize, simply add this in the code window

    Code:
    Private Sub cboSize_AfterUpdate()
        cboPricing.requery
    End Sub
    Then just repeat this process for the upcharge combo

    Steve

  7. #7
    Join Date
    Jun 2012
    Posts
    15
    Hi Steve- thanks for the message. I tried putting in the code as you described but it never worked. I was hoping you could describe how to do it with my dB attached. Any help or directions would be greatly appreciated- Thank you!
    Attached Files Attached Files

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •