By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,098 Members | 936 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,098 IT Pros & Developers. It's quick & easy.

Unique OrderId number Help

P: n/a
Ken
I am trying to create an order id that is as follows
ymm-000 this would be 501-001 the first record for Jan 2005
502-001 the first for Feb 2005 and so on.
Any help would be appreciated

Thanks
Ken

Nov 13 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a

"Ken" <ke******@yahoo.com> wrote in message news:11*********************@c13g2000cwb.googlegro ups.com...
I am trying to create an order id that is as follows
ymm-000 this would be 501-001 the first record for Jan 2005
502-001 the first for Feb 2005 and so on.
Any help would be appreciated

Thanks
Ken


try this (break it down in sections (noted by ampersands) when you try it, so you can slowly built it up and see if it works for
you. It shows 001 as the first order of that day and 002 as the second order of that day - if the numbers are sequential (i.e. 1,2
3,4,5,6,7,, etc..)

Make sure to replace the name of the table and field with your own.

Any questions, please ask.

right(Format(Date(), "yyyy"), 1) & format(date(), "mm") & format((dlookup("[ID]", "[orders]", "int([orders]![orderdate])="
int(date() )-dmin("[ID]", "[orders]", "int([orders]![orderdate])=" int(date() )+1)), "000")

- Nicolaas
Nov 13 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.