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 / General 2 / July 2007

Tip: Looking for answers? Try searching our database.

Appending auto increment numbers on a given root

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
thorben.grosser@gmail.com - 19 Jul 2007 08:30 GMT
Hello Newsgroup,

as I am building an archive database, I got to give every folder a
single ID which is made of different characters, eg: 1-2-568-5468.
The fixed part 1-2-568- gives information about the folders location
(rack, building...) so is determined by the user input.
The last four digits are an automatically assigned number ranging from
0000-9999.

How do I create such an assignment if I want not only an automatically
incrementing number, but it should be a new series for every fixed
part (1-2-568-0001, 1-2-847-0001, 2-2-441-0001 instead of
1-2-568-0001, 1-2-847-0002, 2-2-441-0003...) in MS Access,

thanks in advance
Thorben Grosser
Stefan Hoffmann - 19 Jul 2007 09:56 GMT
hi Thorben,

> as I am building an archive database, I got to give every folder a
> single ID which is made of different characters, eg: 1-2-568-5468.
> The fixed part 1-2-568- gives information about the folders location
> (rack, building...) so is determined by the user input.
This is a wrong table layout as the "fixed part" contains meanigful
information. So add fields for "rack, building..." and your four digit
number.

You can than easily use

  Nz(DMax("FourDigit", _
          "table", _
          "rack = .. AND building = .. AND .."),0) + 1

to determine your next number.

mfg
--> stefan <--
 
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



©2009 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.