Help!

Autonumber

 
  

Post new topic   General Reply to Topic (not reply to a specific post)    Forums Home -> General Discussions RSS
Next:  upload form confirmation to multiple emails  
Author Message
Kerry Purdy
External


Since: Apr 21, 2006
Posts: 14



PostPosted: Wed Oct 28, 2009 12:06 pm    Post subject: Autonumber
Archived from groups: microsoft>public>access (more info?)

Hi,

How can I set my autonumber to be 4 characters please so as not to look
silly as a PO number e.g. 0001...0010...0100...etc instead of 1.

Many thanks
Back to top
fredg
External


Since: Jan 30, 2004
Posts: 3580



PostPosted: Wed Oct 28, 2009 12:43 pm    Post subject: Re: Autonumber [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Wed, 28 Oct 2009 12:06:01 -0700, Kerry Purdy wrote:

> Hi,
>
> How can I set my autonumber to be 4 characters please so as not to look
> silly as a PO number e.g. 0001...0010...0100...etc instead of 1.
>
> Many thanks

"Set" the autonumber?
You can't. As a number value 0001 is the same as 1 and Access will not
save preceding zeros in a Number datatype field.

Display the autonumber?
Set the control's Format property to:
0000

What do you intend to do when the autonumber field value gets to 9999?
Note: An AutoNumber field is designed only to be unique, and not
necessarily consecutive.
If (as it appears it does in you message) the autonumber has meaning
(other than being unique), you should not be using it in this manner.
Create your own counter field (incrementing it by 1 after you add each
new record) and assign that value +1 to each new invoice record. Use
the same Format property as indicated above to display it with 4
digits. Keep the autonumber field as the unique record identifier.
--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail
Back to top
NuBie via AccessMonster.c
External


Since: Oct 28, 2009
Posts: 1



PostPosted: Wed Oct 28, 2009 4:10 pm    Post subject: Re: Autonumber [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

if you want it displayed to be of 4 characters you might use this function:
Format(<yourFieldOrVariable>, "0000").

Kerry Purdy wrote:
>Hi,
>
>How can I set my autonumber to be 4 characters please so as not to look
>silly as a PO number e.g. 0001...0010...0100...etc instead of 1.
>
>Many thanks

--
spread the WORD

Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/Forums.aspx/access/200910/1
Back to top
Display posts from previous:   
Post new topic   General Reply to Topic (not reply to a specific post)    Forums Home -> General Discussions All times are: Eastern Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum