Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms / May 2008

Tip: Looking for answers? Try searching our database.

Custom Counter refresh

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Carlos1815 - 07 May 2008 23:13 GMT
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
KARL DEWEY - 08 May 2008 00:16 GMT
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.
Signature

KARL DEWEY
Build a little - Test a little

>      I have a text box on a form that displays a custom counter.
> However, like many people that deal with multiple records, sometimes
[quoted text clipped - 12 lines]
>
> Carlos
Carlos1815 - 08 May 2008 15:31 GMT
On May 7, 7:16 pm, KARL DEWEY <KARLDE...@discussions.microsoft.com>
wrote:
> How can anyone be expected to be able to suggest changes to your custom
> counter without knowing what makes it tick?
[quoted text clipped - 21 lines]
>
> - 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
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.