Martyh
Registered User.
- Local time
- Today, 00:40
- Joined
- May 2, 2000
- Messages
- 196
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.
At the beginning of accessing the form ("frmTrxWInvoicesExp"),
I store the sum of the invoices into a variable in a module of Global Variables
The code is:
********************************************************
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.
*********************************
Now for the question:
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 thru (as well as subsequent times) the form no longer gets the value of Me![2tblInvoices Subform]!SumOfInvExp.
Have I got the proper syntax for this sum? or is there something else wrong with my approach to the problem?
At the beginning of accessing the form ("frmTrxWInvoicesExp"),
I store the sum of the invoices into a variable in a module of Global Variables
The code is:
********************************************************
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.
*********************************
Now for the question:
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 thru (as well as subsequent times) the form no longer gets the value of Me![2tblInvoices Subform]!SumOfInvExp.
Have I got the proper syntax for this sum? or is there something else wrong with my approach to the problem?