Gogrnoid = Forms![frm_goruskisiler]!mtn_ogrenciid
Gogrid = Forms![frm_goruskisiler]![ogrenciler].Form![ogr_id]
For Each GItem In Me.listekisiler.ItemsSelected
Gadsoyad = Me.listekisiler.Column(1, GItem)
Gogrno = Me.listekisiler.Column(0, GItem)
Next GItem
Select Case cercevesecim
Case 1
If DCount("gorus_id", "tbl_gorusler", "[olay_id] = " & olay_is_no & " And [ogrenci_id]= " & Gogrnoid & " And [ogretmen_id]= " & Gogrno) <> 0 Then
MsgBox (Gadsoyad & " İsimli Öğretmen Daha Önce Eklenmiş !")
Else
DoCmd.SetWarnings False
Forms![frm_goruskisiler]![frm_gorusu_alinanlar].Form.Requery
DoCmd.RunSQL "INSERT INTO tbl_gorusler (ogrenci_id,olay_id,adi_soyadi,ogretmen_id,kim) VALUES ('" & Gogrnoid & "',' " & olay_is_no & "','" & Gadsoyad & "',' " & Gogrno & "','Öğretmen')"
DoCmd.SetWarnings True
End If
Me.frm_gorusu_alinanlar.Requery
Case 2
If DCount("gorus_id", "tbl_gorusler", "[olay_id] = " & olay_is_no & " And [ogrenci_id]= " & Gogrnoid & " And [ogretmen_id]= " & Gogrno) <> 0 Then
MsgBox (Gadsoyad & " İsimli Rehber Öğretmen Daha Önce Eklenmiş !")
Else
DoCmd.SetWarnings False
Forms![frm_goruskisiler]![frm_gorusu_alinanlar].Form.Requery
DoCmd.RunSQL "INSERT INTO tbl_gorusler (ogrenci_id,olay_id,adi_soyadi,ogretmen_id,kim) VALUES ('" & Gogrnoid & "',' " & olay_is_no & "','" & Gadsoyad & "',' " & Gogrno & "','Rehber Öğretmen')"
DoCmd.SetWarnings True
End If
Me.frm_gorusu_alinanlar.Requery
Case 3
If DCount("gorus_id", "tbl_gorusler", "[olay_id] = " & olay_is_no & " And [ogrenci_id]= " & Gogrnoid & " And [ogretmen_id]= " & Gogrno) <> 0 Then
MsgBox (Gadsoyad & " İsimli Sınıf Öğretmeni Daha Önce Eklenmiş !")
Else
DoCmd.SetWarnings False
Forms![frm_goruskisiler]![frm_gorusu_alinanlar].Form.Requery
DoCmd.RunSQL "INSERT INTO tbl_gorusler (ogrenci_id,olay_id,adi_soyadi,ogretmen_id,kim) VALUES (' " & [Gogrnoid] & "',' " & olay_is_no & "','" & Gadsoyad & "',' " & Gogrno & "','Sınıf Öğretmeni')"
DoCmd.SetWarnings True
End If
Me.frm_gorusu_alinanlar.Requery
Case 4
If DCount("gorus_id", "tbl_gorusler", "[olay_id] = " & olay_is_no & " And [ogrenci_id]= " & Gogrnoid & " And [adi_soyadi]= '" & Gadsoyad & "'") <> 0 Then
MsgBox (Gadsoyad & " İsimli Veli Daha Önce Eklenmiş !")
Else
DoCmd.SetWarnings False
Forms![frm_goruskisiler]![frm_gorusu_alinanlar].Form.Requery
DoCmd.RunSQL "INSERT INTO tbl_gorusler (ogrenci_id,olay_id,adi_soyadi,kim) VALUES (' " & [Gogrnoid] & "',' " & olay_is_no & "','" & Gadsoyad & "','Veli' )"
DoCmd.SetWarnings True
End If
Me.frm_gorusu_alinanlar.Requery
End Select
bu kodu test edin.