I have know solved the syntax error in the FROM clause.
I have been trying to solve No value given for one or more required parameters, but have not been able to solve it.
Could anyone please give me a suggestion. Error happens on da.Fill(ds, "RoyalYachtingAssociation2")
I have tried changing the SQL statement but this does not seem to affect it. I have checked all field names and they are correct.
Dim SQL As String = "SELECT BoatDefectLog.BoatDefectLogID, BoatDefectLog.HullNumber, BoatDefectLog.Defect, BoatDefectLog.DateReported, BoatDefectLog.Repaired, BoatDefectLog.DateRepaired, Owner.FirstName, Owner.Surname, Owner.Address, Owner.PostCode, Owner.RYAMembershipNumber, Owner.PositionInClub, Owner.MemberID " & _
" FROM Owner, BoatDefectLog WHERE Owner.MemberID = BoatDefectLog.MemberID AND Surname = '"
userInput = TextBox1.Text
SQL = String.Concat(SQL, userInput)
SQL = String.Concat(SQL, "'")
da = New OleDb.OleDbDataAdapter(SQL, con)
Dim dataAdapter As New OleDb.OleDbDataAdapter(commandString, con)