Help with Dmin!

JBurlison

Registered User.
Local time
Today, 14:33
Joined
Mar 14, 2008
Messages
172
im trying to automatically generate numbers for a primary key but i want to start at like 130000, and make it auto add one every time a new record is created. and use that number as the default value in the primary key field.

im confuesed as to how to apply it do i put it in a query or VBA,

Dmin ("Column Name", "Table Name", Min Value) how do i apply this method?
 
J,

In ADDITION to an AutoNumber, you can assign your own. But, keep
an AutoNumber as your PK.

Use the Search Facility here and look for "DMax" and/or "DMax + 1.
It's a fairly common topic.

Do try to avoid constructing a compound number like:

CompanyX-2007-001

You can store the first few parts as independent fields and just increment
the sequence #. The Search examples should show that.

hth,
Wayne
 

Users who are viewing this thread

Back
Top Bottom