I am working on a custom business program for a distributor. They deal with returns and varying discounts. My task is to create two buttons:
1. Click the button and ALL the line item quantities are multiplied by "-1"
I currently have an Event Procedure as such:
"Private Sub Command107_Click()
Me.qtyord = -1 * Me.qtyord
End Sub"
No matter what I've tried it will ONLY change the current line item. I've even tried manually selecting all the line items without success. Any suggestions?
2. Click the button and ALL Discount fields change to reflect the "Base Discount" which is displayed on the Invoice form but ultimately comes from and is stored in the Customer form/table. I have attempted two methods by putting the button IN the subform & IN the main form. Neither has worked toward my goal and the main form version didn't work AT ALL.
I currently have an Event Procedure as such:
Subform Version:
"Private Sub Command45_Click()
Me.Discount = Forms!Invoices.Discount
End Sub"
Main Form Version (current attempt):
"Private Sub Command45_Click()
Forms!Invoices.Discount = Me!InvoiceDetail.Discount
End Sub"
If I can get either of these discount buttons to work it would be great! I have been mulling it over for two weeks now and am starting to think a query might be better but VBA should do the job. Maybe I'm suffering from programmers block? Who knows.
Thanks!