BofRossClan
Technical User
I have a sales entry form for a small art business using Access 2003. My sales entry form is set up with "sales" being the whole sale, and "transactions" being a subform with individual transactions. The sales table contains the customer information, subtotal, sales tax, total, tender received. The totals are computed in a separate table and brought into the form using Dlookup.
I'm having an issue with what happens when a transaction is entered, but the person entering does not exit the row. The underlying table with my calculations does not update.
I tried to get past this issue with this stupid little code which forced the last entry to be included in the calculation:
DoCmd.GoToRecord , , acNewRec
DoCmd.GoToRecord , , acLast
However, when I did that, it made a weird thing happen with another part of my code. When the sale is complete, I run this code to make sure the tender received has been entered:
If Me.txtTenderTotal <> Me.Total_Sale Then
Beep
Response = MsgBox("Tender received does not equal Total Sale. Are you sure you want to continue?", vbCritical + vbYesNo)
If Response = vbNo Then
Me.Filter = "SalesID = " & intSALESID
Exit Sub
End If
End If
Selecting "No" should take them back to the form and the sale they were entering. However, the other code now causes this stupid dippy do thing where it hides all the transactions, and the only way to get the records back is to right click on the transaction id on the form and "Filter by Selection".
There must be either another way to update the underlying query, or stop losing my transactions when payment is forgotten to be entered.
Any ideas?
I'm having an issue with what happens when a transaction is entered, but the person entering does not exit the row. The underlying table with my calculations does not update.
I tried to get past this issue with this stupid little code which forced the last entry to be included in the calculation:
DoCmd.GoToRecord , , acNewRec
DoCmd.GoToRecord , , acLast
However, when I did that, it made a weird thing happen with another part of my code. When the sale is complete, I run this code to make sure the tender received has been entered:
If Me.txtTenderTotal <> Me.Total_Sale Then
Beep
Response = MsgBox("Tender received does not equal Total Sale. Are you sure you want to continue?", vbCritical + vbYesNo)
If Response = vbNo Then
Me.Filter = "SalesID = " & intSALESID
Exit Sub
End If
End If
Selecting "No" should take them back to the form and the sale they were entering. However, the other code now causes this stupid dippy do thing where it hides all the transactions, and the only way to get the records back is to right click on the transaction id on the form and "Filter by Selection".
There must be either another way to update the underlying query, or stop losing my transactions when payment is forgotten to be entered.
Any ideas?