Running the Program
13. OK, be sure to save your project. Press F5 to run the program:
When the BindingCollection is initialized, we display how many items are in the collection in the form's
Load event. As we expected, there are two (because we have added two text boxes to the collection).
14. Click OK to dismiss the message box and allow the form to display itself. As you can see, there is nothing fancy. The user can click the Move Next button to display the two fields from the next record:
Now check the check box. Each time the Move Next button is clicked, the following message box is displayed:
We are intercepting the enumerated values for both the
Status variables passed into the
MoveComplete event in our class.
15. Now close down the program. When you end the program, press F2 to bring up the Object Browser:
Select the ADODB choice in the top drop-down box. I bet you were wondering how to find the enumerated constants for the
Status but were afraid to ask. Well, this is yet another example of where the Object Browser is invaluable.
I remember when the Internet Explorer 3.0 came out. You could program it using VB, but the documentation was as scarce as hen's teeth. So I simply created an object variable of type IE and looked at the object browser. Everything was there in plain view! You could see all of the events, properties, methods and constants. Its helpful to think of the Object Browser as your universal reference for any object you may need to program.