Results 1 to 5 of 5
  1. #1
    Join Date
    Jan 2004
    Posts
    64

    Unanswered: Calculation in Form Makes Every Order Amount Same

    I have an order form where the changes in one record applies to every record. What do I need to do so if I update one record that update is just for that record not all the records in the form?
    The fields I have are:
    Subscription Code: (combo1, Unbound). Rep selects a record in here which creates a related drop down box on the next combo box.
    Subscription Def: (combo3, Unbound). Rep selects a product from drop down.
    Price: (combo7, Unbound). Price related to combo3 appears in combo7. Rep selects price.
    Quantity: (Unbound)
    Discount: (Unbound)
    DiscountAmount: (Unbound). Discount/100
    OrderAmount: (Unbound)

    Heres the code I wrote. Please help me figure out what Im doing wrong. THANKS.

    Private Sub Combo1_AfterUpdate()
    OrderAmount.Value = (Nz(Me.Combo7 * Quantity)) - (Nz(Me.Combo7) * Quantity * DiscountAmount)

    Me!Combo3 = Null
    Me!Combo3.Requery
    Me!Combo7 = Null
    Me!Combo7.Requery
    End Sub
    Private Sub Combo3_AfterUpdate()
    OrderAmount.Value = (Nz(Me.Combo7 * Quantity)) - (Nz(Me.Combo7) * Quantity * DiscountAmount)
    End Sub
    Private Sub Combo3_Change()
    Me!Combo7 = Null
    Me!Combo7.Requery
    End Sub
    Private Sub Combo7_AfterUpdate()
    OrderAmount.Value = (Nz(Me.Combo7 * Quantity)) - (Nz(Me.Combo7) * Quantity * DiscountAmount)
    End Sub
    Private Sub Discount_AfterUpdate()
    OrderAmount.Value = (Nz(Me.Combo7 * Quantity)) - (Nz(Me.Combo7) * Quantity * DiscountAmount)
    End Sub
    Private Sub DiscountAmount_Change()
    OrderAmount.Value = (Nz(Me.Combo7 * Quantity)) - (Nz(Me.Combo7) * Quantity * DiscountAmount)
    End Sub
    Private Sub Quantity_AfterUpdate()
    OrderAmount.Value = (Nz(Me.Combo7 * Quantity)) - (Nz(Me.Combo7) * Quantity * DiscountAmount)
    End Sub

  2. #2
    Join Date
    Dec 2003
    Location
    Dallas, TX
    Posts
    1,004
    hi bsarman,

    I can't tell by checking your code but if you can make a Copy of your database and remove all pertinent info and replace with dummy info., then Zip and Post here I would be glad to check it out and try to repair it for you. Unless someone can solve it for you sooner.

    just trying to help,
    Bud

  3. #3
    Join Date
    Jan 2004
    Posts
    64

    Where can I sent the email?

    Thank you so much.

  4. #4
    Join Date
    Jan 2004
    Posts
    64

    Here's the file.

    Please email me at bsarman@marshallswift.com if you have any questions.

    You don't know how much I appreciate this.
    Attached Files Attached Files

  5. #5
    Join Date
    Dec 2003
    Location
    Dallas, TX
    Posts
    1,004
    bsarman,

    I d/l your file but only have the one form for Login. Can't get to the tables and such to see how things are set up. I click on RepName combo box but that's about all.

    Bud

Posting Permissions

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