Teuntja123
Registered User.
- Local time
- Yesterday, 21:17
- Joined
- Sep 17, 2013
- Messages
- 21
Hi all,
I created a form where people to fill in some data.
After they are done with this, they should hit the 'next' button and the record will be stored * they will start over with a new/empty form.
Because they sometimes forgot to fill in some data I created a check on the 'next button', so my SQL like as follow right now:
Private Sub Button_Save_New_Click()
If IsNull("FIELD1") Or IsNull("FIELD2")...Then
MsgBox "Missing info!", , "Incomplete Form!"
End If
On Error GoTo Err_addnew_Click
DoCmd.GoToRecord , , acNewRec
Exit_addnew_Click:
Exit Sub
Err_addnew_Click:
MsgBox Err.Description
Resume Exit_addnew_Click
End Sub
The problem is that when they forgot something, the pop-up will come, but after hitting Ok, it will still save & go to the next error.
Can someone help me with adjusting the code so it will only go the next if there will be no empty fields?
Kind Regards, Teun
I created a form where people to fill in some data.
After they are done with this, they should hit the 'next' button and the record will be stored * they will start over with a new/empty form.
Because they sometimes forgot to fill in some data I created a check on the 'next button', so my SQL like as follow right now:
Private Sub Button_Save_New_Click()
If IsNull("FIELD1") Or IsNull("FIELD2")...Then
MsgBox "Missing info!", , "Incomplete Form!"
End If
On Error GoTo Err_addnew_Click
DoCmd.GoToRecord , , acNewRec
Exit_addnew_Click:
Exit Sub
Err_addnew_Click:
MsgBox Err.Description
Resume Exit_addnew_Click
End Sub
The problem is that when they forgot something, the pop-up will come, but after hitting Ok, it will still save & go to the next error.
Can someone help me with adjusting the code so it will only go the next if there will be no empty fields?
Kind Regards, Teun