check a required field when record nav buttons are used.
i have a form that has 2 checkboxes. if i click next, previous, add new, last, first, i want to force the user to check one of the checkboxes before they leave. i've got the afterupdate on the checkboxes coded so if one is checked the other is uncheck. below is the code i want to use to check the boxes but i can't find a good place to put it. i've tried putting the code in form_afterupdate, form_current, and form_afterinsert and none give me the result i want.
If Not IsNull([PartNumber]) Then
If ExpLicenseReq.Value = 0 And LicenseNotReq.Value = 0 Then
Me.Quantity = Me.Quantity
MsgBox "need to select YES or NO for Export License Required"
ExpLicenseReq.SetFocus
Exit Sub
End If
End If
i have a form that has 2 checkboxes. if i click next, previous, add new, last, first, i want to force the user to check one of the checkboxes before they leave. i've got the afterupdate on the checkboxes coded so if one is checked the other is uncheck. below is the code i want to use to check the boxes but i can't find a good place to put it. i've tried putting the code in form_afterupdate, form_current, and form_afterinsert and none give me the result i want.
If Not IsNull([PartNumber]) Then
If ExpLicenseReq.Value = 0 And LicenseNotReq.Value = 0 Then
Me.Quantity = Me.Quantity
MsgBox "need to select YES or NO for Export License Required"
ExpLicenseReq.SetFocus
Exit Sub
End If
End If