W
Willam Roberts
I have [Total] field on my main form [Invoices]. This [Total] field displays
the Sum of the line-items in the Subform [InvoiceDetails] by referencing an
invisible calculated Field[detTotal] in the footer of that Subform. Pretty
straight forward stuff. This is my dilemma , I want to the user to be able
to make changes to the [Quantity] and/or the [UnitPrice] and have the new
[Total] displayed immediately on the main form after leaving either of these
two fields. I was successfully able to accomplish this by simply placing a
'me.refresh' statement in the AfterUpdate event on both the [Quantity] &
[UnitPrice] field.
The PROBLEM is that in the BeforeUpdate Event for the subform
[InvoiceDetails], I have a routine that detects if the form is dirty and
prompts the user to Yes/No/Cancel before moving off the record. I cannot
seem to update the [Total] field without prematurely triggering the
BeforeUpdate event in the subform thus annoying the user to confirm every
change when they are not necessarily moving off that record. I have tried
every thing I could think of, i.e. subqueries, subforms, accessing an
invisible [detTotal] field in the subform. They all work but present the
same problem. Any Ideas?
Regards
William Roberts
the Sum of the line-items in the Subform [InvoiceDetails] by referencing an
invisible calculated Field[detTotal] in the footer of that Subform. Pretty
straight forward stuff. This is my dilemma , I want to the user to be able
to make changes to the [Quantity] and/or the [UnitPrice] and have the new
[Total] displayed immediately on the main form after leaving either of these
two fields. I was successfully able to accomplish this by simply placing a
'me.refresh' statement in the AfterUpdate event on both the [Quantity] &
[UnitPrice] field.
The PROBLEM is that in the BeforeUpdate Event for the subform
[InvoiceDetails], I have a routine that detects if the form is dirty and
prompts the user to Yes/No/Cancel before moving off the record. I cannot
seem to update the [Total] field without prematurely triggering the
BeforeUpdate event in the subform thus annoying the user to confirm every
change when they are not necessarily moving off that record. I have tried
every thing I could think of, i.e. subqueries, subforms, accessing an
invisible [detTotal] field in the subform. They all work but present the
same problem. Any Ideas?
Regards
William Roberts