Hello everybody,
my name is Christian and I just started experimenting with Access to create my first database.
I have a problem I cannot google an answer to:
I have a form that creates a new recordset when it is opened and populates some data.
Now I wanted to give the possibility to close it without saving the new recordset. I used the following:
Code:
Private Sub Form_BeforeUpdate(Cancel As Integer)
If MsgBox("Save changes?", vbYesNo, "Save?") = vbNo Then
Me.Undo
Cancel = True
End If
End Sub
Two problems:
1> It counts up my autonumber. That is more cosmetical and not really a problem, but can I create a new recordset "virtually" that is only really created when I close the form?
2> After my safe message and clicking "no", access also displays a message "You can't save this record at this time...". Can I disable this message (because I already decided I don t want to save on the first form)
Thank you