K
katz
Hello,
I have posted this problem before but no solution, I will try to explain it
better because it's very important to me, please help.
I have a Mainform (Invoice) with a Subform with details. In the subform I
have a
control name 'Amount ' and in the Form footer I have a control TotAmt that
Sums the Amount from all the records in the Subform (the total amount of the
invoice).
I also have a textbox TotInvoiceAmt displayed on the main form. e.g.
TotInvoiceAmt =[Invoice Detail].[Form]![TotAmt], to display the total amount
of the invoice on the Mainform.
I also have a button called PayButton on the Invoice Mainform that is using
the amount (the total amount of the invoice) from the txtbox TotInvoiceAmt
for other processing.
As I enter the detail records the TotInvoiceAmt gets updated, as I go to the
next
record (line). But when I am entering details before going to the next line,
the
TotInvoiceAmt is not updated yet (because it's not saved yet).
The problem is, many times I can press the PayButton before going to the
next line, and the TotInvoiceAmt doesn't include the last line from the
details so I don't have the total amount of the invoice (only if I press
twice the PayButton).
In Short, when I press the PayButton I need the Total amount of the Invoice.
somebody told me to add DoEvents on the Click event,
somebody told me to try Me.[NameOfYourSubfomControl].Form.Dirty = False
but it doesn't work.
Is there an other solution? Please Let me know.
Thanks again
Happy New Year
Abe
I have posted this problem before but no solution, I will try to explain it
better because it's very important to me, please help.
I have a Mainform (Invoice) with a Subform with details. In the subform I
have a
control name 'Amount ' and in the Form footer I have a control TotAmt that
Sums the Amount from all the records in the Subform (the total amount of the
invoice).
I also have a textbox TotInvoiceAmt displayed on the main form. e.g.
TotInvoiceAmt =[Invoice Detail].[Form]![TotAmt], to display the total amount
of the invoice on the Mainform.
I also have a button called PayButton on the Invoice Mainform that is using
the amount (the total amount of the invoice) from the txtbox TotInvoiceAmt
for other processing.
As I enter the detail records the TotInvoiceAmt gets updated, as I go to the
next
record (line). But when I am entering details before going to the next line,
the
TotInvoiceAmt is not updated yet (because it's not saved yet).
The problem is, many times I can press the PayButton before going to the
next line, and the TotInvoiceAmt doesn't include the last line from the
details so I don't have the total amount of the invoice (only if I press
twice the PayButton).
In Short, when I press the PayButton I need the Total amount of the Invoice.
somebody told me to add DoEvents on the Click event,
somebody told me to try Me.[NameOfYourSubfomControl].Form.Dirty = False
but it doesn't work.
Is there an other solution? Please Let me know.
Thanks again
Happy New Year
Abe