What do you suggest instead of Global variables - or are you implying Public variables in a Module = bad and Public Shared members (variables) in a Public Class = good (or at least ok)?
I'm not either of us want to get into this, seeing as how you've already written a fair amount of code...
But what I would do is create an Order object. It would hold your OrderTotal dollar total as a property, plus the currency the total is in (dollars vs. pesos), as well as a strongly-typed collection of OrderItem objects. Each OrderItem object would have the name & description of the item, the price and quantity, and other relevant info.
I would create a controller class that would hold the Order object, plus anything else needed for the form to display to the user. The form itself would be very thin -- just what's needed to show the data to the user (formatting the OrderTotal property with the currency specified, converting DateTime values to the user's preferred format, etc).
The controller class would contain most of the logic needed to manage the form, and call down into lower layers to create/retrieve/update or delete Orders and OrderItems.
The advantages of doing it this way are:
1) It decouples presentation of the data from how it's stored and how business rules are enforced.
2) You're using objects, and not procedural code.
3) You gain better reuse, as code is contained with the data that it manages.
4) You can brag to other programmers that you're using the Model-View-Controller design pattern.
Hope this gets you interested in doing this. Like I said, you probably won't for this project, but maybe for the next one...
Chip H.
____________________________________________________________________
If you want to get the best response to a question, please read FAQ222-2244 first