i have a continuous sub form to which the user adds new records
the validation rules & tab stops vary depending on the value in the first and sometimes the second field of the subform
Problems arise when the user decides to edit a control in previous entry
I am trying to prevent the user from exiting the current record until they reach the final command button on the subform
here is what i have done
but when i get to the caseCost button the form will not tab to the next record
the validation rules & tab stops vary depending on the value in the first and sometimes the second field of the subform
Problems arise when the user decides to edit a control in previous entry
I am trying to prevent the user from exiting the current record until they reach the final command button on the subform
here is what i have done
but when i get to the caseCost button the form will not tab to the next record
Code:
Private Sub Form_Dirty(Cancel As Integer)
isflagUp = True
End Sub
Code:
Private Sub Form_BeforeUpdate(Cancel As Integer)
Debug.Print isFlagUp
If (isFlagUp) Then
MsgBox msgtxt, vbCritical, msgCaption
Cancel = True
End If
End Sub
Code:
Private Sub CaseCost_GotFocus()
isFlagUp = False
Me.CaseCost.ForeColor = vbBlue
Me.Latest_Eligibility_Code.Enabled = False
Me.Latest_Eligibility_Code.Locked = True
Me.Latest_Eligibility_Code.TabStop = False
Debug.Print isFlagUp