AUTO NUMBER

U

Utopic®

Hi

How I can do an "Auto Incremental" field (like Auto Number) but that begins at 100???

Sorry for my english

Hugs from Argentina,

Utopic.-
 
K

Ken Snell

Use this expression as the "incrementing" method for a regular, numeric,
long integer formatted field:

NewNumber = Nz(DMax("FieldName", "TableName"), 99) + 1



Or you can use an autonumber field that you "preset" to 100 by running an
append query that writes a record into the blank table with the autonumber
field set to 99, then delete that record and don't compact the database
until you've added a real record:

INSERT INTO TableName (AutoNumberFieldName)
SELECT 99;


--
Ken Snell
<MS ACCESS MVP>

Hi

How I can do an "Auto Incremental" field (like Auto Number) but that begins
at 100???

Sorry for my english

Hugs from Argentina,

Utopic.-
 
U

Utopic®

Sorry for my ignorance, but, where can I put this expression*??? .... In
which part? in a Table? In a Field?

I hope you understand me.

Thank you!!!


----------------------------------------------------------------------------
----


----- Original Message -----
From: "Ken Snell" <[email protected]>
Newsgroups: microsoft.public.access
Sent: Friday, February 06, 2004 1:11 AM
Subject: Re: AUTO NUMBER
 
K

Ken Snell

This expression would be used in a form that is being used for data entry.
You would run it as a VBA code step or as a macro when you start a new
record.

Based on your reply, perhaps it would be good if you give us more
description/info about what you're wanting to do so that we can provide more
specific suggestions.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top