473,385 Members | 1,353 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Losing invoicenumbers

3
In order to become a unique invoicenumber for each invoice, i use a attached table with a counterfield into which i keep the next invoicenumber to use each time a new invoice has to be printed
In my application, the user select all orders in a multiselectbox for which a invoicereport has to be print, and after that a button is clicked to begin the printing of the invoices.
For each invoice, the invoicenumber in the counterfield of the attached table is retrieved and filled in in the invoicenumber textbox of the invoice. Meanwhile 1 is added to the value of the counterfield,what wil be the invoicenumber for the next invoice to be printed. AFter the printing of the invoice is done, the invoicenumber is saved in the orderstable.
All works well as long as no problem occures during printing. If for some reason the printing of the invoice fails, the number of the invoice is lost what has for consequences that a gap occures in the numbering of the invoices, what is not allowed. I can of course easely change the number in the table to regain the lost number, but the users of my program of course aren't allowed to get directly to the table with the counterfield and so they are not in the possiblilty to correct the number.
How and where should i generate the invoicenumber, keeping the possibilty to print a serie of invoices after selecting the appropriate orders,so that any malfunction of the printing of the report don't give me the described difficulty?.
.
Jul 16 '07 #1
2 1155
kepston
97 Expert
You could use a message box, to ask the user if the invoice printed correctly, before updating the invoice counter.
Jul 19 '07 #2
Lysander
344 Expert 100+
In order to become a unique invoicenumber for each invoice, i use a attached table with a counterfield into which i keep the next invoicenumber to use each time a new invoice has to be printed
In my application, the user select all orders in a multiselectbox for which a invoicereport has to be print, and after that a button is clicked to begin the printing of the invoices.
.
If you stored the invoice number against each order selected, then if the printing of that invoice failed, you could go back to the orders and recreate the invoice. You could then have a re-print button on your form to re-print an existing invoice, instead of creating a new one.
Jul 19 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

7
by: vivek | last post by:
Do any of you guys have any idea what might be the reason for losing session variables, i was working on a page where i had to stroe a array in a session(trust me that was the only 'way' i could...
1
by: Scott Lyon | last post by:
I'm maintaining (read: I didn't write it, nor do I have the time to spend to rewrite it) an application that is suddenly giving me grief. The reason I say suddenly, is because we're in the...
32
by: Neil Ginsberg | last post by:
We're using SQL Server 7 with an Access 2000 MDB as a front end with ODBC linked tables. I recently created a new set of tables for the app, and users are complaining that unsaved data is being...
86
by: Michael Adams | last post by:
I don't know if you have noticed, but it seems like Microsoft is losing interest in C#, and putting their energy into Visual Basic.NET instead. For instance, online chats by language since July...
4
by: Stephen | last post by:
I have a .NET (1.1 framework) application that is losing a session variable on only a few PC's. The main page is loading up in a frame in a Portal application. On the Page_Load it stores an...
5
by: fbwhite | last post by:
I know this issue has been brought up many times, but I have tried many of the solutions to no avail. I wanted to give my specific case to see if someone could be of any help. We are using the...
9
by: Adrian Parker | last post by:
We have a website that works everywhere but on a few PCs on this one site.. Asp.Net 1.1 Server = Windows 2003 Client = XP In the web.config we use - cookieless="false" in the browser settings...
0
by: Jimmy Reds | last post by:
Hi, Sorry if this appears twice but I post through Google Groups and it had a funny 5 minutes and didn't appear to post this message the first time. I am setting session variables on a page...
2
by: Jimmy Reds | last post by:
Hi, I am setting session variables on a page then doing a header/location redirect to a second page however I am losing one of my session variables. Not all of them, just one. Here are some...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.