Strange problem - Need Expert help
Hey guys,
On a Point of Sales form i am writing for a company i have hit a hurdle.
Heres how it goes:
Their sale number format is as follows:
S03A100
the above number would indicate that the sale is the 100'th sale in January 2003
S - Sale
03 - Year
A - Month
100 - n'th sale that month.
Ok.
Now i have a label with the sale number in it and a command button either side (a left button and a right button) emulating the data control.
i have the left button decreasing the sale number by 1 and showing the details of that sale on the form, and obviously the right button increases the sale number.
the problem is this:
for example when i hit sale 1 for any given month (ie S03B1) i need it to kick over to january (A) and go to the last sale made in january.
and the same going forwards in sale numbers and also when the year changes.
I cant for the life of me work out how to do this.
Sorry for the odd explanation but it needed a little background info to see the problem.
Anyone got any ideas on how to solve this one?
Any help would be much appreciated.
Thanks in advance
nightshift
PS. ALl the info for the sales i need is stored in various databases, and they are running SQL Server 2000, just incase that helps