I have a report that I need a sequential number printed at the top. Like an invoice number. I can't use an autonumber in a field in the table because I don't need the number based on records. It doesn't matter how many records or pages the report includes, I need the number to increase by one when every time the report is printed(or ran).
So on the form where the Command Button is the print report, I added a hidden txt box and in the OnClick Event of the Print button I set txtbox.value = txtbox.value +1 to increase it.
And then on the report I referenced an unbound txt box to the form txtbox and it adds fine and prints sequential numebrs in the report header. That is until I close the application.
When opened again the number starts at 30000 which was default because thats what number I need to start at. I know why it goes back to default again when I restart the Application because it is default. Can't seem to get aroung it. But I need it to keep counting somehow. ANY ideas?
So on the form where the Command Button is the print report, I added a hidden txt box and in the OnClick Event of the Print button I set txtbox.value = txtbox.value +1 to increase it.
And then on the report I referenced an unbound txt box to the form txtbox and it adds fine and prints sequential numebrs in the report header. That is until I close the application.
When opened again the number starts at 30000 which was default because thats what number I need to start at. I know why it goes back to default again when I restart the Application because it is default. Can't seem to get aroung it. But I need it to keep counting somehow. ANY ideas?