J
Jody
I have a form that has a next button built in and I want the user to only use
this button, the problem is that the user can still hit the page down key and
move on, I have a message box that pops up when this happens but the form
still goes on to the next record. I would like to have some sort of code that
keeps the form from moving on if certain criterion is not met. I would put
this on the individual fields except the fields are check boxes and the user
needs to only have one of several fields checked to be correct. I have tried
to use the gotorecord,, acprevious but I am getting runtime errors. This is
what I have so far.
Private Sub Form_BeforeUpdate(Cancel As Integer)
If Me.Text78 <> 0 Then
MsgBox "Please fix this issue before moving on"
DoCmd.GoToRecord , , acLast
End If
End Sub
this button, the problem is that the user can still hit the page down key and
move on, I have a message box that pops up when this happens but the form
still goes on to the next record. I would like to have some sort of code that
keeps the form from moving on if certain criterion is not met. I would put
this on the individual fields except the fields are check boxes and the user
needs to only have one of several fields checked to be correct. I have tried
to use the gotorecord,, acprevious but I am getting runtime errors. This is
what I have so far.
Private Sub Form_BeforeUpdate(Cancel As Integer)
If Me.Text78 <> 0 Then
MsgBox "Please fix this issue before moving on"
DoCmd.GoToRecord , , acLast
End If
End Sub