-
Notifications
You must be signed in to change notification settings - Fork 0
/
Form_frmPUFachHinzufuegen.cls
76 lines (61 loc) · 2.13 KB
/
Form_frmPUFachHinzufuegen.cls
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
VERSION 1.0 CLASS
BEGIN
MultiUse = -1 'True
END
Attribute VB_Name = "Form_frmPUFachHinzufuegen"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Compare Database
Option Explicit
Dim lngKlassengruppeUid As Long
Private Sub cmdAbbrechen_Click()
'Schließen ohne Speichern
On Error GoTo Err_cmdclose_Click
DOCMD.Close
Exit_cmdclose_Click:
Exit Sub
Err_cmdclose_Click:
MsgBox Err.Description
Resume Exit_cmdclose_Click
End Sub
Private Sub cmdSpeichern_Click()
' Speichere das Fach in der Tabelle TabNotenFachKlassengruppe und lege die Notensätze für alle Schüler dieser Klasse an.
' melde anschließend an das Hauptformular zurück
Dim myClsDb As clsDB
Set myClsDb = New clsDB
myClsDb.KlassenNotenFachHinzufuegen lngKlassengruppeUid, Me.cmbfach
myClsDb.SchuelerNotenEinzelnesFachAnlegen lngKlassengruppeUid, Me.cmbfach
Forms("FrmKlassenFächer").FachHinzugefuegt = True
cmdAbbrechen_Click
End Sub
Private Sub Form_Load()
'Höhe und Breite einstellen
Me.InsideHeight = Me.Section(acDetail).Height
Me.InsideWidth = Me.Width
End Sub
Private Sub Form_Open(Cancel As Integer)
Dim strValue As Variant
Dim strFaecherUids As Variant
Dim strSql As String
Dim strSelect As String
Dim strWhere As String
Dim strWhere2 As String
Dim strOrder As String
Dim intCount As Integer
strWhere2 = ""
If Not IsNull(Me.OpenArgs) Then
strValue = Split(Me.OpenArgs, ";", , vbBinaryCompare)
lngKlassengruppeUid = strValue(0)
strFaecherUids = Split(strValue(1), ",", , vbBinaryCompare)
For intCount = 0 To UBound(strFaecherUids)
strWhere2 = strWhere2 & " AND TabFach.uid <> " & strFaecherUids(intCount)
Next intCount
End If
strSelect = "SELECT TabFach.uid, TabFach.bezeichnung_lang FROM TabFach "
strOrder = "ORDER BY TabFach.sort_uid, TabFach.kuerzel;"
strWhere = "WHERE TabFach.profil=True " & strWhere2 & " "
strSql = strSelect & strWhere & strOrder
Me.cmbfach.RowSource = strSql
End Sub