Hi
I have a form where the user can Add new students;
when finished the user clicks on SAVE, the programm asks the question "add a new student"
From here 2 options;
users clicks NO; the record got saved (this works fine)
but when the user clicks YES; (the form textboxes clear)
and you add a student. Now the user doesnt want to SAVE this but cancel the last. So, the user clicks CANCEL.
Now the previous additions (in the last sequence) are not stored either!
what part do I mis;
here's my piece of code:
does someone see my fault
thx in advance
Al
I have a form where the user can Add new students;
when finished the user clicks on SAVE, the programm asks the question "add a new student"
From here 2 options;
users clicks NO; the record got saved (this works fine)
but when the user clicks YES; (the form textboxes clear)
and you add a student. Now the user doesnt want to SAVE this but cancel the last. So, the user clicks CANCEL.
Now the previous additions (in the last sequence) are not stored either!

what part do I mis;
here's my piece of code:
Private Sub cmdSave_Click()
On Error GoTo Err_cmdSave_Click
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
If MsgBox("De gegevens zijn opgeslagen. Wilt u nog een cursist toevoegen?", vbYesNo + vbQuestion + vbDefaultButton2, ConAppName) _
= vbYes Then
DoCmd.GoToRecord , , acNewRec
txtAdrAdd1.SetFocus
Else
DoCmd.Close
Form_FAdresBoek.Requery
Form_FAdresBoek.lstdata.Requery
End If
end sub
On Error GoTo Err_cmdSave_Click
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
If MsgBox("De gegevens zijn opgeslagen. Wilt u nog een cursist toevoegen?", vbYesNo + vbQuestion + vbDefaultButton2, ConAppName) _
= vbYes Then
DoCmd.GoToRecord , , acNewRec
txtAdrAdd1.SetFocus
Else
DoCmd.Close
Form_FAdresBoek.Requery
Form_FAdresBoek.lstdata.Requery
End If
end sub
does someone see my fault
thx in advance
Al