Exercises

team lib
  1. Add the record selector controls and class to frmIceCream and frmIngredients . This will demonstrate to you the value of reusability and how easy it is to get a coherent look and feel across your forms using your new class.

  2. Think about other ways you could use WithEvents to encapsulate functionality into a class for use in your projects. Add an event handler for the record selector's combo box to sink the NotInList and display an error message to the user that the data they tried to find in the combo isn't a valid record. This will replace the annoying "the text you entered isn't an item in the list" with a more user -friendly message.

  3. Implement a NotInList handler class for combos to open a form to edit the data in the table behind the combo.

  4. Notice that although the combo control does select a record, it doesn't stay "synched" with the form if you page down through records in the form. Add a public method to the combo's class to set the combo equal to the PK in the textbox and call that method from the form's Current event so that the combo stays synched to the form.

 
team lib


Beginning Access 2002 VBA
Beginning Access 2002 VBA (Programmer to Programmer)
ISBN: 0764544020
EAN: 2147483647
Year: 2003
Pages: 256

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net