Another Auto Number

J

Jan G. Thorstensen

Hi. I am a newbie. I use Access 2k under Window98 2e.

When I create a table, I usually use an auto number field as my primary key.
However, I need this field to contain all numbers from, say 501 + +, that is
501, 502, 503, 504 and so on.

The numbers will be the invoice number, so it is important that no number is
missing (i.e. it can not look like; "501, 502, 505, 506, 507 where 503 and
504 is missing).

I think I have seen a formula that looks like "=MAX([field]+1)". Where and
How can I implement this in my application?

Regards
Jan
 
R

Roger Carlson

Actually, you want to use the DMAX function. On my website (see sig below)
is a small sample database called: AutonumberProblem.mdb which illustrates
how.
 
J

Jan G. Thorstensen

Thank you Roger!
What I did wrong was that I tried to implement the function directly in the
table's
standard text property. This did not work but your suggestion worked
perfectly.

Thanks again.

Jan

Roger Carlson said:
Actually, you want to use the DMAX function. On my website (see sig below)
is a small sample database called: AutonumberProblem.mdb which illustrates
how.

--
--Roger Carlson
www.rogersaccesslibrary.com
Reply to: Roger dot Carlson at Spectrum-Health dot Org


Jan G. Thorstensen said:
Hi. I am a newbie. I use Access 2k under Window98 2e.

When I create a table, I usually use an auto number field as my primary key.
However, I need this field to contain all numbers from, say 501 + +,
that
is
501, 502, 503, 504 and so on.

The numbers will be the invoice number, so it is important that no
number
is
missing (i.e. it can not look like; "501, 502, 505, 506, 507 where 503 and
504 is missing).

I think I have seen a formula that looks like "=MAX([field]+1)". Where and
How can I implement this in my application?

Regards
Jan
 

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

Similar Threads


Top