If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > PC based Database Applications > Microsoft Access > Calculation in Form Makes Every Order Amount Same

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 06-04-04, 13:27
bsarman bsarman is offline
Registered User
 
Join Date: Jan 2004
Posts: 64
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)

Here’s the code I wrote. Please help me figure out what I’m 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
Reply With Quote
  #2 (permalink)  
Old 06-04-04, 14:51
Bud Bud is offline
Registered User
 
Join Date: Dec 2003
Location: Dallas, TX
Posts: 995
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
Reply With Quote
  #3 (permalink)  
Old 06-04-04, 17:55
bsarman bsarman is offline
Registered User
 
Join Date: Jan 2004
Posts: 64
Where can I sent the email?

Thank you so much.
Reply With Quote
  #4 (permalink)  
Old 06-04-04, 17:57
bsarman bsarman is offline
Registered User
 
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
File Type: zip 060404_main_7.zip (1.23 MB, 36 views)
Reply With Quote
  #5 (permalink)  
Old 06-06-04, 06:59
Bud Bud is offline
Registered User
 
Join Date: Dec 2003
Location: Dallas, TX
Posts: 995
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
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On