Hi,
I have a problem on my Invoice form with subform.
After I create new Invoice, I got a following message.
"You can't go to the specified record."
If I click "OK", then it says
"You can't save this record at this time."
If I click "Yes" and close the form and go to Invoice table, the data's saved.
It's been generated after I change the code for some fields.
I wanted to store the calculated numbers to Invoice table after I create new Invoice.
Here are my code:
Private Sub saleTotal_AfterUpdate()
CalSalesTotalAmount
End Sub
Private Sub CalSalesTotalAmount()
Me.saleTotal = Nz(sfrmInvoiceDetail.Form![Total Sum], 0)
Me.totalAmt = Nz(Me.saleTotal, 0) + Nz(Me.salesTax, 0) + Nz(Me.FH, 0)
End Sub
I placed the code to each field event and for the entire form both of them.
Did I do something wrong with this ?
I appreciate your answer.
I have a problem on my Invoice form with subform.
After I create new Invoice, I got a following message.
"You can't go to the specified record."
If I click "OK", then it says
"You can't save this record at this time."
If I click "Yes" and close the form and go to Invoice table, the data's saved.
It's been generated after I change the code for some fields.
I wanted to store the calculated numbers to Invoice table after I create new Invoice.
Here are my code:
Private Sub saleTotal_AfterUpdate()
CalSalesTotalAmount
End Sub
Private Sub CalSalesTotalAmount()
Me.saleTotal = Nz(sfrmInvoiceDetail.Form![Total Sum], 0)
Me.totalAmt = Nz(Me.saleTotal, 0) + Nz(Me.salesTax, 0) + Nz(Me.FH, 0)
End Sub
I placed the code to each field event and for the entire form both of them.
Did I do something wrong with this ?
I appreciate your answer.