|
-
Jan 10th, 2000, 08:54 PM
#1
Thread Starter
New Member
How do I create an autonumber command for Access 97 that creates a sequential number following the following format:
p00/nn. where 00 is the year created?
I'm using the RND() command at the moment in the following construct:
="p" YEAR(NOW())"/"rnd(1-99)
Which returns a value of P2000/nn.
So I would like to condense the YEAR(NOW()) to return only the last two digits of the year.
Also the rnd statement returns a random number between 1 and 99, which is fine for my purposes, but it would be better if it could be made to return the next unused number in the sequence.
Any ideas?
Thanks
------------------
Ron Heywood
-
Jan 11th, 2000, 01:11 AM
#2
Guru
Looks like you'll have to enforce this via code, not via Access autonumber rules...Access doesn't have anything like a trigger to do this for you
-
Jan 12th, 2000, 08:09 PM
#3
Thread Starter
New Member
It'll have to be done in the form of a query generated output anyway I assume, because we need to get the last number and increment it by one, but leave the year as Now() trimmed to the "yy" format.
SQL looks like the next step unless anyone has any better ideas.
Thanks for your help.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|