Auto Number part of a field

G

Guest

I've checked around, and all the similar questions required normalized
tables. This is different.

I've got a table with about 24 fields. I want to create a query with an
additional field whose value will be "20" n, where n is a number starting
from 1 and ending when we run out of rows. The actual order in which the rows
are returned is of no importance to me.

There is no primary key defined, and there's a good possibility that any
given field may contain dplicate values, or might be null.

So for instance I want the query to return this:

Date F_Name L_Name Address1 Address2
New_Field
09222004 Joe Smith 123 Main St.
201
09222004 Mary Jones 345 Main St.
202
Smith Co. 123 Main St. Apt. 2
203
09232004 Marky Mark 225 1st Ave.
204
09232004 Samuel P O Box 4
205
etc...

It's OK for me to hard-code the "20" part into the query - I just want the
third position to start at 1 and keep incrementing until we're done.

Thx.
 
J

Jeff Boyce

Will the "20" ever change? If not, you can format a field to display with a
"20" before the actual number in the field, and not have to store the
literal "20".

If your sequence numbers HAVE to be sequential (no missing numbers), you'll
need to "roll your own" custom numbering procedure. The Access Autonumber
data type can and does "skip". Check the mvps.org/access website, and check
Google.com, ms-access group, for "custom autonumber".
 

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