A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » New Users
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Want to create intelligent auto number generation



 
 
Thread Tools Display Modes
  #1  
Old May 8th, 2004, 02:16 PM
Avir
external usenet poster
 
Posts: n/a
Default Want to create intelligent auto number generation

I wish to make a field [Orderno] to increment like this:

CA-43450, CA-43451, CA-43451

I know how to make it happen; however I wish to give a choice to the user to increment it to CA-43450B (in that case the program will automatically update the previous number i.e. CA-43450 to CA-43450A) and again give a choice to user to move to CA-43450B or to next number i.e. CA-43451

I am a newbee and doesn’t know how to make it possible.

Any clue will be highly appreciated.

Thanks & best regards Avir

  #2  
Old May 9th, 2004, 04:27 AM
Larry Linson
external usenet poster
 
Posts: n/a
Default Want to create intelligent auto number generation

Keep the parts of the number separated, and use DMAX to determine the
highest used numeric part (which you can increment). Give the user a form
from which he/she can choose whether to append a letter or move to the next
higher numeric part.

Just because the users _see_ it as one single number or id doesn't mean it
has to be _stored_ that way.

Larry Linson
Microsoft Access MVP

"Avir" wrote in message
...
I wish to make a field [Orderno] to increment like this:

CA-43450, CA-43451, CA-43451

I know how to make it happen; however I wish to give a choice to the user

to increment it to CA-43450B (in that case the program will automatically
update the previous number i.e. CA-43450 to CA-43450A) and again give a
choice to user to move to CA-43450B or to next number i.e. CA-43451

I am a newbee and doesn't know how to make it possible.

Any clue will be highly appreciated.

Thanks & best regards Avir



  #3  
Old May 9th, 2004, 08:21 AM
Avir
external usenet poster
 
Posts: n/a
Default Want to create intelligent auto number generation

thanks very much!
Is there any way to increment a letter as well? I am trying to use CHR$ to increment it and change it to letter again by EVAL. Is there any better way to increment a letter?

Thanks for your help.
 




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 Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 08:47 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.