So many things:
1) It is a good idea to keep SQL command keywords as all upper case: it helps you identify the various parts of the statement.
2) It is a very good idea to give sensible names to your textboxes: that way you don't get them mixed up. "tbUserName" is much easier to read in code than "Text6" - you get an immediate sense of "is this right" when you read it. Intellisense will "fill in the blanks" so it is almost no extra typing...
3) It is a good idea to delimit your table names if they contain spaces - or preferably use CamelCase table names so you do not need spaces at all...
4) It is a very good idea to use parametrized queries: your way leaves you wide open to an accidental or deliberate SQL Injection attack. Since this could destroy your database, most people try to avoid it...
5) When entering SQL queries, it is recommended that you follow the syntax, and incluyde teh field bnames in your staemnet, so that SQL knows where to put each element...
INSERT INTO mtTable (myColumn, myOtherColumn), VALUES (@MC, @MOC)
Try this:
Dim str1 As String = "INSERT INTO [ticket details] (myColumn, myOtherColumn) VALUES (@MC, @MOC)"
SqlCommand com = new SQLCOmmand(str1, con)
com.Parameters.AddWithValue("@MC", Text1.Text)
com.Parameters.AddWithValue("@MOC", Val(Text7.Text))