dbTalk Databases Forums  

Alphanumeric Autonumbering

comp.database.ms-access comp.database.ms-access


Discuss Alphanumeric Autonumbering in the comp.database.ms-access forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Heidi
 
Posts: n/a

Default Alphanumeric Autonumbering - 07-10-2003 , 04:34 PM






Hi there,

I am setting up a Purchase Order database, and need to have my PO#'s
set up as "MTR-00001" and increment from there. How can I use the
Autonumber function with an alphanumeric field?

I've seen plenty of articles concerning autonumbers, but none have
addressed this issue in depth. I need some step by step
instructions....

Any help is MUCH appreciated!
Thanks!
Heidi

Reply With Quote
  #2  
Old   
Ira Solomon
 
Posts: n/a

Default Re: Alphanumeric Autonumbering - 07-10-2003 , 09:47 PM






Heidi:
The short answer is that you can't.
But you don't have to.
Let the autonumber stay as a long integer.

Use a query to display the PO#s the way you want.

Assume the autonumber field is ID, and the table is TestAuto then in
the query you would have:
PO: "MTR-" & [TestAuto]![ID]

and it would look just as you want.

If data entry is via a form then you could do this with a little code
in the after update event and you wouldn't have to use a query.

If you want to do that let me know and I'll send you the code. It is
only a few lines.

Good Luck
Ira Solomon

On 10 Jul 2003 14:34:29 -0700, hsmith (AT) hmc (DOT) cc (Heidi) wrote:

Quote:
Hi there,

I am setting up a Purchase Order database, and need to have my PO#'s
set up as "MTR-00001" and increment from there. How can I use the
Autonumber function with an alphanumeric field?

I've seen plenty of articles concerning autonumbers, but none have
addressed this issue in depth. I need some step by step
instructions....

Any help is MUCH appreciated!
Thanks!
Heidi


Reply With Quote
  #3  
Old   
Heidi
 
Posts: n/a

Default Re: Alphanumeric Autonumbering - 07-11-2003 , 10:02 AM



Ira Solomon <isolomon (AT) solomonltd (DOT) com> wrote

Quote:
Heidi:
The short answer is that you can't.
But you don't have to.
Let the autonumber stay as a long integer.

Use a query to display the PO#s the way you want.

Assume the autonumber field is ID, and the table is TestAuto then in
the query you would have:
PO: "MTR-" & [TestAuto]![ID]

and it would look just as you want.

If data entry is via a form then you could do this with a little code
in the after update event and you wouldn't have to use a query.

If you want to do that let me know and I'll send you the code. It is
only a few lines.

Good Luck
Ira Solomon

On 10 Jul 2003 14:34:29 -0700, hsmith (AT) hmc (DOT) cc (Heidi) wrote:

Hi there,

I am setting up a Purchase Order database, and need to have my PO#'s
set up as "MTR-00001" and increment from there. How can I use the
Autonumber function with an alphanumeric field?

I've seen plenty of articles concerning autonumbers, but none have
addressed this issue in depth. I need some step by step
instructions....

Any help is MUCH appreciated!
Thanks!
Heidi
Hi Ira,

Thank you so very much for your help! You are a life saver!!! Yes, the
data entry will be through a form. Can you please send me the code you
mentioned? I would appreciate it more than you know!! Wish I had some
handy advise or a present to give you!!! Have a wonderful day!
Heidi


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.