"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