Undo Question

  • Thread starter Thread starter MeganF via AccessMonster.com
  • Start date Start date
M

MeganF via AccessMonster.com

I have several forms with the following code -
if me.dirty then me.undo
and it undoes any typing i've done.

my problem is - i'm creating a record in a table with an autonumber. and
that doesn't get cancelled. so i lose the number. it's an invoicing system
so that's bad.

is it because the form is based on a query with a filter?
can you please point me in the right direction.
 
hi,
that is the problem with access autonumber. i don't use
it. and a lot of other people have found some advantage to
creating their own autonumber system. opinions vary on
this subject but some people create their own autonumber
table. for new record code gets the only number in the
table. then after the new record is complete, code adds
one to the number in the autonumber table. this only works
for true numbers.
other people calculate the next number by getting the max
number for the table(not autonumber table) and adding one
to it. this work well for those who want odd autonumber
(like www00001) which is not a number. this query produces
autonumber W-103
SELECT "W-" & Right(Max([Id]),3)+1 AS IDD FROM tblRData;
like i said. opinions vary on this subject. i don't think
there is a sure fire fool proof way to do autonumbers but
there are a number of techniques.
regards
 
Back
Top