-
Notifications
You must be signed in to change notification settings - Fork 0
/
Form_frmSchülerdatenImportieren.cls
62 lines (48 loc) · 1.46 KB
/
Form_frmSchülerdatenImportieren.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
VERSION 1.0 CLASS
BEGIN
MultiUse = -1 'True
END
Attribute VB_Name = "Form_frmSchülerdatenImportieren"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Compare Database
Option Explicit
Private booBeenden As Boolean
Private Sub cmdauswaehlen_Click()
txtdatei = vbGetOpenFilename("Textdateien" & vbNullChar & "*.txt;*.csv", "*.txt", CurrentProject.Path)
End Sub
Private Sub cmdClose_Click()
On Error GoTo Err_cmdclose_Click
booBeenden = True
DOCMD.Close
Exit_cmdclose_Click:
Exit Sub
Err_cmdclose_Click:
MsgBox Err.Description
Resume Exit_cmdclose_Click
End Sub
Private Sub cmdImport_Click()
If Not IsNull(Me.txtdatei) And Me.txtdatei <> "" Then
SchuelerImportieren Me.txtdatei
Else
MsgBox "Keine Datei zum Importieren ausgewählt!", vbCritical, "Schüler importieren"
End If
End Sub
Private Sub Form_Load()
booBeenden = False
Me.InsideHeight = Me.Section(acDetail).Height
Me.InsideWidth = Me.Width
End Sub
Private Sub Form_Close()
If IstFormularGeoeffnet("FrmImport") Then
Forms.Item("FrmImport").Visible = True
End If
End Sub
Private Sub Form_Unload(Cancel As Integer)
If booBeenden = False Then
MsgBox "Schließen nur über die Schaltfläche Formular schließen möglich", vbOKOnly, "Notenprogramm FOSBOS"
Cancel = True
End If
End Sub