I have the following problem:
(Summary)-- I need to know who to create a counter to count how many invoices were created in a specific month and add (Contatinate) this number to the end of my current invoice number in the following way: for the first invoice: RPI0306001, second, RPI0306002, etc.. Obviously at the beginning of each month this counter must once again reset to zero and start over again)
Details of what I have done :
The value of invoice number is obtained like this "RPI" & Format(Date, "yymm"
in a sense I create a string out of my field Date and it outputs (For instance June 2003)= "RPI0306", but I need to concatinate a counter to the end of this value, so that I can have more than one invoice every month. For the example: fist invoice in June: RPI0306001, second RPI0306002, etc..However I am not sure how I can create a counter and apply it..
my pseudocode in C++ looks like this:
(Invoice number and month are both variables that represent the fields on the database)
Invoice Number = current invoice number;
month=previous invoice number;
If Current== Month
month++; //this increments the variable month by one
else
cout<<" "<<current<<endl;
//this outputs the current invoice number
If this is confusing, please contact me for claryfication. If you can help me PLEASE DO...I've been working on this for over three weeks and this is not letting me move on with my work. Please help me if you can..
Thanks
(Summary)-- I need to know who to create a counter to count how many invoices were created in a specific month and add (Contatinate) this number to the end of my current invoice number in the following way: for the first invoice: RPI0306001, second, RPI0306002, etc.. Obviously at the beginning of each month this counter must once again reset to zero and start over again)
Details of what I have done :
The value of invoice number is obtained like this "RPI" & Format(Date, "yymm"
in a sense I create a string out of my field Date and it outputs (For instance June 2003)= "RPI0306", but I need to concatinate a counter to the end of this value, so that I can have more than one invoice every month. For the example: fist invoice in June: RPI0306001, second RPI0306002, etc..However I am not sure how I can create a counter and apply it..
(Invoice number and month are both variables that represent the fields on the database)
Invoice Number = current invoice number;
month=previous invoice number;
If Current== Month
month++; //this increments the variable month by one
else
cout<<" "<<current<<endl;
//this outputs the current invoice number
If this is confusing, please contact me for claryfication. If you can help me PLEASE DO...I've been working on this for over three weeks and this is not letting me move on with my work. Please help me if you can..
Thanks