G
Gordon
On my form I have a text box for quantity issued (txtQuantityIssued)
and then right after that an unbound text box (txt365Total) which has
a calculated value for the total of the quantity issued in the
previous 12 months.
I want txt365Total to be updated after a value is entered for
txtQuantityIssued. The only way I can manage to populate txt365Total
is if I put the following code in the form's On Current event:
Dim strStartDate As String, strEndDate As String
strStartDate = Me!txtStartDate
strEndDate = Date
Me!txt365Total = DSum("[fldQuantityIssued]", "[tblCompTicketIssues]",
"[fldIssueDate] between # " & strStartDate & "# and #" & strEndDate &
"#")
Note that strStartDate is a hidden text box on the form which gets it
value from =(Date()-365)
Whilst the above code correctly calculates the running total for
quantity issued, it only updates after the record is saved. If I put
the code in the AfterUpdate event of txtQuantityIssued, no value
appears at all.
Help.
Gordon
and then right after that an unbound text box (txt365Total) which has
a calculated value for the total of the quantity issued in the
previous 12 months.
I want txt365Total to be updated after a value is entered for
txtQuantityIssued. The only way I can manage to populate txt365Total
is if I put the following code in the form's On Current event:
Dim strStartDate As String, strEndDate As String
strStartDate = Me!txtStartDate
strEndDate = Date
Me!txt365Total = DSum("[fldQuantityIssued]", "[tblCompTicketIssues]",
"[fldIssueDate] between # " & strStartDate & "# and #" & strEndDate &
"#")
Note that strStartDate is a hidden text box on the form which gets it
value from =(Date()-365)
Whilst the above code correctly calculates the running total for
quantity issued, it only updates after the record is saved. If I put
the code in the AfterUpdate event of txtQuantityIssued, no value
appears at all.
Help.
Gordon