G
Guest
I need to see if the value in a control has changed from the time that the
form opened until the time that the form is closed.
Here is my proposed code:
At the beginning of accessing the form ("frmTrxWInvoicesExp"), I store the
sum of the invoices into a variable in a module of Global Variables
************************************************************
Private Sub Form_Load()
modGlobalVariables.EarlySumInvExp = Nz(Me![2tblInvoices
Subform]!SumOfInvExp, 0)
'MsgBox "The value is " & Me![2tblInvoices Subform]!SumOfInvExp
End Sub
***************************
Then when I go to leave the form I access the some additional code. and look
at the difference between the values of the first sum (of invoices) and the
last sum (of invoices). If there is a difference, then I make changes, and if
not, then I carry on exiting the form.
*********************************
When I go thru the loop the first time round (ie thru an "open the form" and
"close the form") things seem to work as they should. However, the problem
that I encounter is that the 2nd time (as well as subsequent times) the form
no longer gets the value of Me![2tblInvoices Subform]!SumOfInvExp.
So the question is : Have I got the proper syntax for this sum? or is there
something else wrong with my approach to the problem?
form opened until the time that the form is closed.
Here is my proposed code:
At the beginning of accessing the form ("frmTrxWInvoicesExp"), I store the
sum of the invoices into a variable in a module of Global Variables
************************************************************
Private Sub Form_Load()
modGlobalVariables.EarlySumInvExp = Nz(Me![2tblInvoices
Subform]!SumOfInvExp, 0)
'MsgBox "The value is " & Me![2tblInvoices Subform]!SumOfInvExp
End Sub
***************************
Then when I go to leave the form I access the some additional code. and look
at the difference between the values of the first sum (of invoices) and the
last sum (of invoices). If there is a difference, then I make changes, and if
not, then I carry on exiting the form.
*********************************
When I go thru the loop the first time round (ie thru an "open the form" and
"close the form") things seem to work as they should. However, the problem
that I encounter is that the 2nd time (as well as subsequent times) the form
no longer gets the value of Me![2tblInvoices Subform]!SumOfInvExp.
So the question is : Have I got the proper syntax for this sum? or is there
something else wrong with my approach to the problem?