Link to home
Start Free TrialLog in
Avatar of shieldsco
shieldscoFlag for United States of America

asked on

Access Required Fields

I'm using the following code and it works fine for the most part, however it allows the user to move to the next record after the second  attemp without entering the date resolved. How do I require the user to enter the date resolved before moving to the next record.

Private Sub Form_BeforeUpdate(Cancel As Integer)
If Not IsNull(Me.ResolveCode) And IsNull(Me.DateResolved) Then
MsgBox "Please enter the Date Resolved", vbExclamation, "FSB GovTrip"

        Me.DateResolved.SetFocus
       
       Exit Sub
    End If

   
 
 
End Sub
ASKER CERTIFIED SOLUTION
Avatar of Jim Dettman (EE MVE)
Jim Dettman (EE MVE)
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of shieldsco

ASKER

Thanks