I reviewed my code over and over again to ensure no typos. My program was running until I added the code pages 154 -155 for creating a Custom Collection. The error occurs and highlights txtName.Text. Again I ensured the code is exactly like the book.
Code:
Public Sub DisplayCustomer(ByVal customer As Customer)
'Display the customer details on the form
txtName.Text = customer.Name
txtFirstName.Text = customer.FirstName
txtLastName.Text = customer.LastName
txtEmail.Text = customer.Email
End Sub
My error states "Property 'SelectedCustomer' doesn't return a value on all code paths. A null reference exception could occur at run time when the results is used."