Autonumber

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

How can I get my autonumber to start with the (Current Year) - Autonumber?
Any advice would be greatly appreciated, thanks!
 
Peggy

If you are talking about the Access datatype called "Autonumber", don't!
First, the Autonumber in Access is designed to be a unique row identifier,
and is generally unfit for human consumption. It sounds like you are
considering using it for something folks would see.

Second, putting two facts into one field (Current Year) and Autonumber is
not a good design. Keep one fact in one field. Use a query to concatenate
the value from your [Current Year] field and your Autonumber field.

(you did say "any advice", right?!)

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
Hi Peggy,

The autonumber won't be able to start like that. Because it is a Long Int
and you would be generating a string. Can you store the year in another field
and concatenate it on display?

eg. on a form with an autonumber 'ID' and text field 'CurrentYear'
if the first record in the DB has an ID of 1 and a CurrentYear of 2006 and I
put a textbox with the control Source of
=[CurrentYear] & ' - ' & [ID]

The text box displays:
2006 - 1

Does that help?
Denny
 
I DID say any advice - and I do appreciate it. :)
So how would I go about creating this query to concatenate?
Sorry, I'm a basic Access user and this is getting a little advanced for me.
Thanks!

Jeff Boyce said:
Peggy

If you are talking about the Access datatype called "Autonumber", don't!
First, the Autonumber in Access is designed to be a unique row identifier,
and is generally unfit for human consumption. It sounds like you are
considering using it for something folks would see.

Second, putting two facts into one field (Current Year) and Autonumber is
not a good design. Keep one fact in one field. Use a query to concatenate
the value from your [Current Year] field and your Autonumber field.

(you did say "any advice", right?!)

Regards

Jeff Boyce
Microsoft Office/Access MVP

Peggy said:
How can I get my autonumber to start with the (Current Year) - Autonumber?
Any advice would be greatly appreciated, thanks!
 
Peggy

Open a new query in design mode. Add your table (the one that hold the
[Current Year] field and the field that holds your "ID" number -- think
twice before using an Autonumber for this field).

In one of the Field "cells", add something like:

MyID: [Current Year] & " - " & [YourIDField]

Regards

Jeff Boyce
Microsoft Office/Access MVP

Peggy said:
I DID say any advice - and I do appreciate it. :)
So how would I go about creating this query to concatenate?
Sorry, I'm a basic Access user and this is getting a little advanced for
me.
Thanks!

Jeff Boyce said:
Peggy

If you are talking about the Access datatype called "Autonumber", don't!
First, the Autonumber in Access is designed to be a unique row
identifier,
and is generally unfit for human consumption. It sounds like you are
considering using it for something folks would see.

Second, putting two facts into one field (Current Year) and Autonumber is
not a good design. Keep one fact in one field. Use a query to
concatenate
the value from your [Current Year] field and your Autonumber field.

(you did say "any advice", right?!)

Regards

Jeff Boyce
Microsoft Office/Access MVP

Peggy said:
How can I get my autonumber to start with the (Current Year) -
Autonumber?
Any advice would be greatly appreciated, thanks!
 
Back
Top