First I will show you my sql, just in case it is some obvious syntax error on my part:

"INSERT INTO tblResults(status, enthusiasm, communication, knowledge, interaction,
                                   organization, responsiveness, instID, comment)" & _
 "VALUES(""" & status & """, """ & enthusiasmB & """, """ & communicationB & """, """ & _
                     knowledgeB & """, """ & interactionB & """, """ & organizationB & """, """ & _
                     responsivenessB & """, (" & getFacIDB & "), """ & _
                     comment & """)"

where

Dim getFacIDB As String = "SELECT instID FROM tblInstructor" & _
                                " WHERE firstName = '" & firstNameB & "'"

So if you can't tell what I am trying to do is pull the id from another table so that I have a valid faculty reference between the tables. What I am looking for is a Select statement nested inside an Insert statement.

The error I am getting is "Unspecified error" on:
dr = resultsCommandA.ExecuteNonQuery

Any help is appreciated.

Instead of nesting the queries I pulled them apart and set the Select statement to a variable and then called my sql for the insert statement. If anyone has any better ideas just let me know I am open to suggestions.

This question has already been answered. Start a new discussion instead.