Hi,
I am doing a web database using asp page. i am using MS Access to create table. I have problem of dealing with the order id. My order id is a combination of 1st letter of the month, followed by year (2 digits), then 3rd letter of current month, then followed by a suffix of 4 digits (from 0000-9999)
for i.e. April 2004,
A04R0001
A04R0002 and so on.....until a new month
and,
for every new month, the suffix will be reset to 0000 and when new record is added the suffix should become 0001. prefix remain the same format as mentioned above.
for i.e. M04Y0001
M04Y0002 and so on...
i have tried to used default values in the table properties but it won't work for the suffix.
(this is what i did)
=Mid(MonthName(Month(Date()),True),1,1) & Format(Now(), "yy") & UCase(Mid(MonthName(Month(Date()),True),3,1))
any idea how i can go about doing this so whenever i submit a new order form from my web page, the order id will be automatically generated and inserted into the new record with other order information such as customer name and etc.
i have tried access database and relationshop forum but it doens't help me much.
Plz help!!!!
I am doing a web database using asp page. i am using MS Access to create table. I have problem of dealing with the order id. My order id is a combination of 1st letter of the month, followed by year (2 digits), then 3rd letter of current month, then followed by a suffix of 4 digits (from 0000-9999)
for i.e. April 2004,
A04R0001
A04R0002 and so on.....until a new month
and,
for every new month, the suffix will be reset to 0000 and when new record is added the suffix should become 0001. prefix remain the same format as mentioned above.
for i.e. M04Y0001
M04Y0002 and so on...
i have tried to used default values in the table properties but it won't work for the suffix.
(this is what i did)
=Mid(MonthName(Month(Date()),True),1,1) & Format(Now(), "yy") & UCase(Mid(MonthName(Month(Date()),True),3,1))
any idea how i can go about doing this so whenever i submit a new order form from my web page, the order id will be automatically generated and inserted into the new record with other order information such as customer name and etc.
i have tried access database and relationshop forum but it doens't help me much.
Plz help!!!!