Master-Detail p66-8 error
The build on page 68 gives me this error in line 4:
"Handles clause requires a WithEvents variable defined in the containing type or one of its base types."
I notice that as I key in this part of line 4...
bindingNavigatorSaveItem.Click
...the popup window does not include bindingNavigatorSaveItem, but does list other, similarly named options:
bindingNavigatorAddNewItem
bindingNavigatorCountItem
bindingNavigatorDeleteItem
bindingNavigatorMoveFirstItem
bindingNavigatorMoveLastItem
bindingNavigatorMoveNextItem
bindingNavigatorMovePreviousItem
bindingNavigatorPositionItem
bindingNavigatorSeparator
bindingNavigatorSeparator1
bindingNavigatorSeparator2
I'm guessing that whatever causes SaveItem to not appear in this popup list is probably the source of the problem. Here's the code below, pretty much straight from the text except that I named the project Crouton instead of MyDB. Apart from this error all projects so far have worked like a charm. Any insights?
-------------------
Imports System.Data
Public Class Form1
Private Sub bindingNavigatorSaveItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles bindingNavigatorSaveItem.Click
(rest of code removed from post after solution determined)
|