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 / Modules / DAO / VBA / March 2007

Tip: Looking for answers? Try searching our database.

How do I change a sequential control number for my database in acc

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Awright - 09 Mar 2007 14:22 GMT
Our office database is set up that every entry receives a new control number
- 2006-0001, 2006-0002, 2006-003, etc. I would like to change it for calendar
year 2007. How do I change it?

Our access expert is gone and not available
John Nurick - 09 Mar 2007 21:04 GMT
There's no way of telling without digging under the hood.

Good practice would be to get the year number automatically from the
system date, but if it's still using 2006 the "Access expert" can't have
done that.

Otherwise, there may be a table called "Settings" or some such
containing a record with fields something like this:

    SettingName    SettingValue
    "ControlYear"  2006

Working in a spare copy of your database, change the 2006 to 2007 and
see if that makes a difference.

If there's no "setting" like that, take a look at the table. Is the
control number stored in two fields, 2006 and "0001", 2006 and "0002",
and so on? If so, maybe the calendar year comes from the Default Value
of the first field, or of the control it's bound to.

There are lots of other things the "expert" could have done, most of
them undesirable. Open the data entry form in design view and look at
its code module. The control number could be assigned in the form's
BeforeInsert event, or one of several other events. Searching the code
for
    If Me.NewRecord
may help find it.

>Our office database is set up that every entry receives a new control number
>- 2006-0001, 2006-0002, 2006-003, etc. I would like to change it for calendar
>year 2007. How do I change it?
>
>Our access expert is gone and not available

--
John Nurick [Microsoft Access MVP]

Please respond in the newsgroup and not by email.
Awright - 09 Mar 2007 21:43 GMT
Thanks for your help. I will try your suggestions.

> There's no way of telling without digging under the hood.
>
[quoted text clipped - 34 lines]
>
> Please respond in the newsgroup and not by email.
Van T. Dinh - 10 Mar 2007 05:54 GMT
If you know VBA, you can also trace the code behind the data entry Form that
your "Access expert" has done to see where the systen gets the year from ...

What happened in the last 2 months???

Surely there must have been new records since 01/01/2007.

Signature

HTH
Van T. Dinh
MVP (Access)

> Thanks for your help. I will try your suggestions.
 
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.