Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Option Compare Database
- 'Zadanie 6
- Private Sub NR_STUD_AfterUpdate()
- Dim studenciak As DAO.Recordset
- Set studenciak = CurrentDb.OpenRecordset("Studenci", dbOpenSnapshot)
- Dim oceny As DAO.Recordset
- Set oceny = CurrentDb.OpenRecordset("Oceny", dbOpenSnapshot)
- Dim LbOcen(2 To 5) As Integer
- Dim searchPhrase As String 'szukana fraza, u nas: nr studenta
- searchPhrase = "NR_STUD = " & Me!NR_STUD
- Call oceny.FindFirst(searchPhrase)
- NR_STUD = oceny!NR_STUD
- studenciak.FindFirst (searchPhrase)
- NAZWISKO = studenciak!NAZWISKO
- Do While Not oceny.NoMatch
- LbOcen(oceny!OCENA) = LbOcen(oceny!OCENA) + 1
- Call oceny.FindNext(searchPhrase)
- Loop
- Tekst20 = LbOcen(2)
- Tekst18 = LbOcen(3)
- Tekst16 = LbOcen(4)
- Tekst14 = LbOcen(5)
- End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement