Custom Counter refresh

  • Thread starter Thread starter Carlos1815
  • Start date Start date
C

Carlos1815

I have a text box on a form that displays a custom counter.
However, like many people that deal with multiple records, sometimes
the counter loses its place. For example:

Records 1 through 5 are numbered as such, but say you erase record 5
and add a new record, that new record (after record 4) becomes 6.
Now, because it's custom, a user can go up and change that number
manually, but I'd like to avoid that.

Is there a way, using a command button or something like that, to have
the custom record number on each record become erased and then re-
numbered? I've been to a lot of forums, and there were plenty of
threads that came close to my question but didn't answer it exactly.
Thanks in advance!

Carlos
 
How can anyone be expected to be able to suggest changes to your custom
counter without knowing what makes it tick?
Post the code/macro that is behind the scenes for analysis.
 
How can anyone be expected to be able to suggest changes to your custom
counter without knowing what makes it tick?
Post the code/macro that is behind the scenes for analysis.
--
KARL DEWEY
Build a little - Test a little








- Show quoted text -

I have a control on the form named PageID, I have this code for the
control's AfterUpdate event:

DoCmd.RunCommand acCmdRefresh

On the form's Form_Current() event, I have this code:

If Me.NewRecord Then

Me.PageID = Nz(DMax("PageID", "Topic1") + 1, 1)

DoCmd.RunCommand acCmdRefresh

End If

The code works fine for what it's designed to do: for each new record,
it puts in a new consecutive number. However, I would like to add to
this, maybe with a button or something, so when pages are deleted or
the order is messed up somehow, to renumber all the records much like
I described in my previous post. I'm not an Access expert by any
means; I've gotten this far, but I need help to get further. Thank
you!

Carlos
 
Back
Top