I keep getting a NullReferenceException. Any help would be great!
Private Sub fillpub(ByVal argPubID As Integer)
Dim drpub As _books_Fall2012_A2DataSet.PublishersRow
drpub = _books_Fall2012_A2DataSet.Publishers.FindByPubID(argPubID)
If drpub.IsNameNull Then
txtPublisher.Text = ""
Else
txtPublisher.Text = drpub.Name
End If
If drpub.IsAddressNull Then
txtAddress.Text = ""
Else
txtAddress.Text = drpub.Address
End If
If drpub.IsCityNull Then
txtCity.Text = ""
Else
txtCity.Text = drpub.City
End If
If drpub.IsStateNull Then
txtState.Text = ""
Else
txtState.Text = drpub.State
End If
If drpub.IsZipNull Then
txtZipCode.Text = ""
Else
txtZipCode.Text = drpub.Zip
End If
End Sub