Another Auto Number

  • Thread starter Thread starter Jan G. Thorstensen
  • Start date Start date
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
 
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.
 
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
 
Back
Top