I had a form that requiring a Job Order Code, "the Job Order Code is just like number of transaction". We had 12 months in 1 year. I need to reset the starting Job Order Code in every month. For Example:

January: In month of January I had 10 transaction, I started to number 1 up to the last transaction which is number 10. Notice the following month.

February: In month of February I had 8 transaction, I started to number 1 up to the last transaction which is number 8.

I had to reset the Job Order Code or number of transaction per month.

Every month must start to number 1 transaction, how can I do that? I know that you're knowledgeable and I know that you can help me. I am trying to solve this problem because on Monday will be the evaluation for the SYSTEM.

Thank you very much and more power!

Recommended Answers

All 3 Replies

when a month is starting store the starting date. u can store the date in a database or in windows registry. it is better that u store it into the registry.

then while performing a transaction compare current system date with the stored one and find total month difference. if its 1 then one month is covered up then reset the transaction no. to 1 and start counting from it. store current transaction number also so that you can track it while creating the next no. if the month diff. is not equal to 1 then retrieve last transaction no. and increament it by 1 to get the new no.

i hope this logic can be implementable.
try this out and tell me if u need any further assistance.

good luck

regards
Shouvik

thank you very much. I will try the logic that you had formulated.

you are welcome.
don't forget to tell me what have u got finally

i'll be waiting to hear from you.

regards
Shouvik

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.