Thank you Kebo. I ended up with the following code after the update command.

vb.net Code:
  1. Dim resultaat As String
  2.                     opdragresultaat.CommandText = "SELECT GroeperingsKode FROM skedulering2 WHERE kultklas = '" & DGVKultklas & " '"
  3.                     opdragresultaat.Connection = konneksie
  4.                     resultaat = CType(opdragresultaat.ExecuteScalar(), String)
  5.                     kode = resultaat