I'm having some trouble with a before update event. I'm trying to prevent incomplete records so on the before update event I have this code.
So I can catch the null in the step, I get the error msg, I can get the undo so step88 has no data but I cant move the focus to the field that needs data. I get an error something about the record needs to be saved before i can move the focus. Any help
So I can catch the null in the step, I get the error msg, I can get the undo so step88 has no data but I cant move the focus to the field that needs data. I get an error something about the record needs to be saved before i can move the focus. Any help
Code:
Private Sub Step88_BeforeUpdate(Cancel As Integer)
If Nz(Me.step16) <> "" Then
MsgBox " Incomplete data on page 4. Please update the chamber condition step."
Cancel = True
Me.step88.Undo
me.step16.setfocus
Else
Stop
End If
End Sub