B
Billy Smith
I'm using Access 2000 and VBA.
I have a simple bound form that displays a set of records. Sometimes,
when I am not interested in creating a new record, I scroll beyond
the last existing record, i.e. to the "new" record. When I immediately
try to scroll back to the previous record I get an error message
because it tries to save the "new" record it thinks I was trying
to create and of course some of the fields are null because I
didn't fill them in.
I want the option of creating a new record when I scroll to that
"new" record position (i.e. after the last existing record) but
I want to be able to just scroll back to the previous record without
error messages if I don't want to create a new record. How can I do this?
I'm thinking I should put up a yes/no msg box when I scroll to the
"new" record position. I've tried checking for current record in
the form's BeforeUpdate event routine, the Current event routine,
using the Undo method on the form and moving to the previous record
but still can't get it to do just what I want.
Any Ideas on how I can do this?
Thanks in advance.
I have a simple bound form that displays a set of records. Sometimes,
when I am not interested in creating a new record, I scroll beyond
the last existing record, i.e. to the "new" record. When I immediately
try to scroll back to the previous record I get an error message
because it tries to save the "new" record it thinks I was trying
to create and of course some of the fields are null because I
didn't fill them in.
I want the option of creating a new record when I scroll to that
"new" record position (i.e. after the last existing record) but
I want to be able to just scroll back to the previous record without
error messages if I don't want to create a new record. How can I do this?
I'm thinking I should put up a yes/no msg box when I scroll to the
"new" record position. I've tried checking for current record in
the form's BeforeUpdate event routine, the Current event routine,
using the Undo method on the form and moving to the previous record
but still can't get it to do just what I want.
Any Ideas on how I can do this?
Thanks in advance.