Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

check a required field when record nav buttons are used

Status
Not open for further replies.

drctx

IS-IT--Management
May 20, 2003
226
US
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
 
drctx:
How about the Form's before update? and if they are bounded controls set the underlying fields in the table to as requerid.

Good luck

Estuardo
 
thanks for the reply. that didn't do want i needed it to either. but i found a fix. i made my own record navagation buttons and it works great.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top