Student).CNP 'txtMatrA.Text = gTabelStudenti(gIndiceStudent).matricol 'txtAnA.Text = rst.Fields("AnStudiu") 'txtSemA.Text = ToStringR(rst.Fields("Semestru")) 'txtGrA.Text = rst.Fields("Grupa") End If rst.Close End Sub Private Sub IncarcaStudentiCuContract(cnn As ADODB.Connection) Dim strCaut As String Dim rst As New ADODB.Recordset Dim id As Integer Dim i As Integer Dim strSemAn As String Dim sGrupa As String strSemAn = "" For i = 0 To lstSemestru.ListCount - 1 If lstSemestru.Selected(i) Then If strSemAn <> "" Then strSemAn = strSemAn & " OR " End If strSemAn = strSemAn & "(SemestruCrt = " & Left$(lstSemestru.List(i), 2) & _ " AND AnUniv = " & Mid$(lstSemestru.List(i), 6, 4) & ")" End If Next i id = indDisc strCaut = "Select DISTINCT STUDENTI.NrMatricol, Nume, Initiala, Prenume, Grupa, Studenti.Sectia, SemestruCrt, AnUniv, SemestruPlan from STUDENTI_CONTRACTE, STUDENTI where " & _ "[STUDENTI.Sectia] = STUDENTI_CONTRACTE.SECTIA AND " & _ "[STUDENTI.NrMatricol] = STUDENTI_CONTRACTE.NrMatricol AND " & _ "[STUDENTI_CONTRACTE.Facultatea] = " & gCodFac & " AND " & _ "[STUDENTI_CONTRACTE.Sectia] = " & gSectie & _ " AND [STUDENTI_CONTRACTE.Disciplina] = '" & gTabelDiscipline(id).cod & "'" If chkNumaiGrupa.value = vbChecked Then sGrupa = frmSelectare.lstGrupe.List(frmSelectare.lstGrupe.ListIndex) i = InStr(sGrupa, Chr(9)) If i > 0 Then sGrupa = Trim$(Left$(sGrupa, i - 1)) End If strCaut = strCaut & " AND Trim([STUDENTI.Grupa]) = '" & sGrupa & "'" End If If strSemAn <> "" Then strCaut = strCaut & " AND (" & strSemAn & ")" End If strCaut = strCaut & " ORDER BY Grupa, Nume, Initiala, Prenume;" rst.Open strCaut, cnn, adOpenStatic, adLockReadOnly gNrStudentiCuContract = 0 If rst.RecordCount > 0 Then ReDim gTabelStudentiCuContract(1 To rst.RecordCount) rst.MoveFirst Do While Not rst.EOF gNrStudentiCuContract = gNrStudentiCuContract + 1 gTabelStudentiCuContract(gNrStudentiCuContract).Matricol = rst.Fields("NrMatricol") gTabelStudentiCuContract(gNrStudentiCuContract).Nume = ToStringR(rst.Fields("Nume")) & " " & _ ToStringR(rst.Fields("Initiala")) & " " & _ ToStringR(rst.Fields("Prenume")) gTabelStudentiCuContract(gNrStudentiCuContract).grupa = rst.Fields("Grupa") rst.MoveNext Loop End If rst.Close End Sub Private Sub IncarcaDateNote(cnn As ADODB.Connection) Dim strCaut As String Dim rst As New ADODB.Recordset Dim id As Integer Dim i As Integer Dim strSemAn As String strSemAn = "" For i = 0 To lstSemestru.ListCount - 1 If lstSemestru.Selected(i) Then If strSemAn <> "" Then strSemAn = strSemAn & " OR " End If strSemAn = strSemAn & "(SemestruCrt = " & Left$(lstSemestru.List(i), 2) & _ " AND AnUniv = " & Mid$(lstSemestru.List(i), 6, 4) & ")" End If Next i id = indDisc strCaut = "Select ID, NrMatricol, Sectia, SemestruCrt, AnUniv, Disciplina, SemestruPlan, Data, Nota, NotaC, Absent, NotaFinala from STUDENTI_NOTE where " & _ "[Facultatea] = " & gCodFac & " AND " & _ "[Sectia] = " & gSectie & " AND " & _ "Disciplina = '" & gTabelDiscipline(id).cod & "' " If strSemAn <> "" Then strCaut = strCaut & "AND (" & strSemAn & ") " End If strCaut = strCaut & " ORDER BY Disciplina, Data;" rst.Open strCaut, cnn, adOpenStatic, adLockReadOnly gNrNoteDisciplina = 0 If rst.RecordCount > 0 Then ReDim gTabelNoteDisciplina(1 To rst.RecordCount) rst.MoveFirst Do While Not rst.EOF gNrNoteDisciplina = gNrNoteDisciplina + 1