I agree with CJ.
You might consider code along these lines.
eg. I used Form23 to test.
Code:
Private Sub Form23_AfterUpdate()
Call CalculateAverage
End Sub
Code:
Private Sub TAVG_Click()
'event to force the calculation and display of the Average in TAvg
Call CalculateAverage
End Sub
Code:
Private Sub t1_AfterUpdate()
'process avg after each textbox is valued
Call CalculateAverage
End Sub
Private Sub t2_AfterUpdate()
'process avg after each textbox is valued
Call CalculateAverage
End Sub
Private Sub t3_AfterUpdate()
'process avg after each textbox is valued
Call CalculateAverage
End Sub
Code:
Private Sub CalculateAverage()
' Identify the variables
Dim val1 As Double
Dim val2 As Double
Dim val3 As Double
Dim avg As Double
' Check if the textboxes have valid numeric values; otherwise set to 0
If IsNumeric(Me.T1) Then val1 = CDbl(Me.T1) Else val1 = 0
If IsNumeric(Me.T2) Then val2 = CDbl(Me.T2) Else val2 = 0
If IsNumeric(Me.T3) Then val3 = CDbl(Me.T3) Else val3 = 0
' Calculate the average of the values in the textboxes
avg = (val1 + val2 + val3) / 3
' Set the value of the TAvg textbox
Me.TAVG = avg
End Sub