Hi Tony,
The point I was trying to make is that it's easier on yourself (and
those that might end up having to maintain your code) if you don't put
code directly in your form's or control's event handlers. I believe
your code will be much more readable and easier to plan and maintain
if you put your code in a well thought out class structure with very
little code in your forms.
Instead of putting a lot of code to populate a listview control with
customer information in your button_click, put the code in your
Customer class and then simply call it from your button or any other
place that it's needed.
Sub btnFillCustomerList( )
oCustomer.FillListview(lvCustomer)
End Sub
This avoids the duplication ( the code is in one logical location )
that you mentioned and allows your code to be arranged in logical
units which are easier to understand and maintain .
Cheers,
Don
Redmond, WA
Seems like a lot of waste duplicating the code in the button click.