Hi,
I found it is not difficult to create a new record from code and move to it. I did it this way:
Code:
'open the new form
DoCmd.OpenForm "MyForm"
'take it to the selected record
Set rs = Forms!MyForm.Recordset
rs.AddNew
rs.Update
rs.Bookmark = rs.LastModified
Set rs = Nothing
It has a drawback. It really creates a new row and saves it.
But when using navigation buttons you can create a new record (or navigate beyond the last one) and it will be saved only iff the user enters some values.
I'd like to have the same.
A "create new" button opens this form where I want the bookmark (the selected record) to be the new record, but save it only if values are entered. I tired moving beyond the last record (.MoveLast and then .MoveNext) but that throws an error...
Any ideas? Thanks a lot!