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 / November 2006

Tip: Looking for answers? Try searching our database.

create next highest number

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Burt O - 07 Nov 2006 13:54 GMT
Could someone give me an examble of how to use a VBF to create the next
highest number in the database. I can not use Auto Number as the table
sometimes needs to exported and then imported back in
Stefan Hoffmann - 07 Nov 2006 14:00 GMT
hi Burt,

> Could someone give me an examble of how to use a VBF to create the next
> highest number in the database. I can not use Auto Number as the table
> sometimes needs to exported and then imported back in
As query:

INSERT INTO Table (ID, Field1, Field2)
SELECT Nz(Max(ID), 0) + 1, Value1, Value2 FROM Table

mfG
--> stefan <--
Fred Boer - 07 Nov 2006 15:12 GMT
Dear Burt O:

There are two sample databases illustrating that technique here:

http://www.rogersaccesslibrary.com/download3.asp?SampleName=AutonumberProblem.mdb

HTH
Fred Boer

> Could someone give me an examble of how to use a VBF to create the next
> highest number in the database. I can not use Auto Number as the table
> sometimes needs to exported and then imported back in
 
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.