Hello,
Nearly Xmas, hope everyone enjoys their holidays.
I have a continuous form where I would like to enter a value in one box (not bound), click button and add that to the value of another textbox (Bound).
This is what I have so far, not sure how to indicated where the value/Total is to update in the bound field.
Thanks
Nearly Xmas, hope everyone enjoys their holidays.
I have a continuous form where I would like to enter a value in one box (not bound), click button and add that to the value of another textbox (Bound).
This is what I have so far, not sure how to indicated where the value/Total is to update in the bound field.
Code:
' Check TxtAddMins is > 0
' Take figure (mins) from TxtAddMins and add to TxtActualMins, TxtActualMins updates with total
' Clear TxtAddMins
Private Sub BtnAddMins_Click()
Dim txtmessage As String
Dim addmins As Integer
txtmessage = ""
If Nz(Me.TxtAddMins) = 0 Then
txtmessage = MsgBox("Please enter assembly minutes to Add to Actual Minutes." & vbCrLf & txtmessage)
Me.TxtAddMins.BackColor = vbRed
Me.TxtAddMins.ForeColor = vbWhite
Me.TxtAddMins.SetFocus
Else
Me.TxtAddMins.BackColor = vbWhite
Me.TxtAddMins.ForeColor = vbBlack
addmins = Int(TxtActualMins) + Int(TxtAddMins)
Me.TxtAddMins.Value = 0
End If
End Sub
Thanks