VERSION 5.00
Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "COMDLG32.OCX"
Begin VB.Form frmINFO
BackColor = &H00000000&
Caption = "STUDENT INFORMATION"
ClientHeight = 8055
ClientLeft = 165
ClientTop = 855
ClientWidth = 13005
ClipControls = 0 'False
LinkTopic = "Form1"
ScaleHeight = 8055
ScaleWidth = 13005
StartUpPosition = 3 'Windows Default
WindowState = 2 'Maximized
Begin MSComDlg.CommonDialog DIALOGS
Left = 10200
Top = 3120
_ExtentX = 847
_ExtentY = 847
_Version = 393216
End
Begin VB.Frame Frame3
Caption = "Class Information"
Height = 4095
Left = 0
TabIndex = 30
Top = 3840
Width = 11295
Begin VB.TextBox txtclass1
Height = 285
Index = 4
Left = 9240
TabIndex = 65
Top = 600
Width = 855
End
Begin VB.TextBox txtclass1
Height = 285
Index = 3
Left = 8400
TabIndex = 64
Top = 600
Width = 855
End
Begin VB.TextBox txtclass1
Height = 285
Index = 2
Left = 7560
TabIndex = 63
Top = 600
Width = 855
End
Begin VB.TextBox txtclass1
Height = 285
Index = 1
Left = 6720
TabIndex = 62
Top = 600
Width = 855
End
Begin VB.ComboBox comboType
Height = 315
Index = 5
ItemData = "frmDatabase.frx":0000
Left = 2280
List = "frmDatabase.frx":000D
TabIndex = 60
Text = "comboType"
Top = 2400
Width = 1335
End
Begin VB.ComboBox comboType
Height = 315
Index = 4
ItemData = "frmDatabase.frx":0026
Left = 2280
List = "frmDatabase.frx":0033
Sorted = -1 'True
TabIndex = 59
Text = "comboType"
Top = 2040
Width = 1335
End
Begin VB.ComboBox comboType
Height = 315
Index = 3
ItemData = "frmDatabase.frx":004C
Left = 2280
List = "frmDatabase.frx":0059
TabIndex = 58
Text = "comboType"
Top = 1680
Width = 1335
End
Begin VB.ComboBox comboType
Height = 315
Index = 2
ItemData = "frmDatabase.frx":0072
Left = 2280
List = "frmDatabase.frx":007F
TabIndex = 57
Text = "comboType"
Top = 1320
Width = 1335
End
Begin VB.ComboBox comboType
Height = 315
Index = 1
ItemData = "frmDatabase.frx":0098
Left = 2280
List = "frmDatabase.frx":00A5
TabIndex = 56
Text = "comboType"
Top = 960
Width = 1335
End
Begin VB.ComboBox comboType
Height = 315
Index = 0
ItemData = "frmDatabase.frx":00BE
Left = 2280
List = "frmDatabase.frx":00CB
TabIndex = 55
Text = "comboType"
Top = 600
Width = 1335
End
Begin VB.TextBox txtTeacher
Height = 285
Index = 5
Left = 3720
TabIndex = 54
Top = 2400
Width = 1935
End
Begin VB.TextBox txtgrade
Height = 285
Index = 5
Left = 5760
TabIndex = 53
Top = 2400
Width = 855
End
Begin VB.TextBox txtClass
Height = 285
Index = 5
Left = 240
TabIndex = 52
Top = 2400
Width = 1935
End
Begin VB.TextBox txtTeacher
Height = 285
Index = 4
Left = 3720
TabIndex = 51
Top = 2040
Width = 1935
End
Begin VB.TextBox txtgrade
Height = 285
Index = 4
Left = 5760
TabIndex = 50
Top = 2040
Width = 855
End
Begin VB.TextBox txtClass
Height = 285
Index = 4
Left = 240
TabIndex = 49
Top = 2040
Width = 1935
End
Begin VB.TextBox txtTeacher
Height = 285
Index = 3
Left = 3720
TabIndex = 48
Top = 1680
Width = 1935
End
Begin VB.TextBox txtgrade
Height = 285
Index = 3
Left = 5760
TabIndex = 47
Top = 1680
Width = 855
End
Begin VB.TextBox txtClass
Height = 285
Index = 3
Left = 240
TabIndex = 46
Top = 1680
Width = 1935
End
Begin VB.TextBox txtTeacher
Height = 285
Index = 2
Left = 3720
TabIndex = 45
Top = 1320
Width = 1935
End
Begin VB.TextBox txtgrade
Height = 285
Index = 2
Left = 5760
TabIndex = 44
Top = 1320
Width = 855
End
Begin VB.TextBox txtClass
Height = 285
Index = 2
Left = 240
TabIndex = 43
Top = 1320
Width = 1935
End
Begin VB.TextBox txtTeacher
Height = 285
Index = 1
Left = 3720
TabIndex = 42
Top = 960
Width = 1935
End
Begin VB.TextBox txtgrade
Height = 285
Index = 1
Left = 5760
TabIndex = 41
Top = 960
Width = 855
End
Begin VB.TextBox txtClass
Height = 285
Index = 1
Left = 240
TabIndex = 40
Top = 960
Width = 1935
End
Begin VB.TextBox txtTeacher
Height = 285
Index = 0
Left = 3720
TabIndex = 37
Top = 600
Width = 1935
End
Begin VB.TextBox txtClass
Height = 285
Index = 0
Left = 240
TabIndex = 32
Top = 600
Width = 1935
End
Begin VB.TextBox txtquarter
Height = 285
Index = 0
Left = 5760
TabIndex = 31
Top = 600
Width = 855
End
Begin VB.Label lblfinal
Alignment = 2 'Center
Caption = "Label5"
Height = 375
Left = 10080
TabIndex = 71
Top = 600
Width = 1095
End
Begin VB.Label Label12
Caption = "Final Grade"
Height = 255
Index = 5
Left = 10080
TabIndex = 70
Top = 240
Width = 975
End
Begin VB.Label Label12
Caption = "Exam"
Height = 255
Index = 4
Left = 9240
TabIndex = 69
Top = 360
Width = 855
End
Begin VB.Label Label12
Caption = "Quarter 4"
Height = 255
Index = 3
Left = 8400
TabIndex = 68
Top = 360
Width = 855
End
Begin VB.Label Label12
Caption = "Quarter 3"
Height = 255
Index = 2
Left = 7560
TabIndex = 67
Top = 360
Width = 855
End
Begin VB.Label Label12
Caption = "Quarter 2"
Height = 255
Index = 1
Left = 6720
TabIndex = 66
Top = 360
Width = 855
End
Begin VB.Label Label12
Caption = "Quarter 1"
Height = 255
Index = 0
Left = 5760
TabIndex = 36
Top = 360
Width = 855
End
Begin VB.Label Label11
Caption = "Teacher"
Height = 255
Left = 3720
TabIndex = 35
Top = 360
Width = 1095
End
Begin VB.Label Label24
Caption = "ClassTitle"
Height = 255
Left = 240
TabIndex = 34
Top = 360
Width = 1215
End
Begin VB.Label Label21
Caption = "Class Type"
Height = 255
Left = 2280
TabIndex = 33
Top = 360
Width = 1095
End
End
Begin VB.Frame Frame2
BackColor = &H00000000&
Caption = "Academics"
BeginProperty Font
Name = "MS Sans Serif"
Size = 12
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H0000FF00&
Height = 3615
Left = 4800
TabIndex = 17
Top = 120
Width = 4575
Begin VB.TextBox txtgrade
Height = 285
Index = 9
Left = 3480
TabIndex = 38
Top = 1560
Width = 855
End
Begin VB.TextBox txthomeroom
Height = 285
Left = 3480
TabIndex = 28
Top = 1920
Width = 855
End
Begin VB.TextBox txtrank
Height = 285
Left = 3480
TabIndex = 26
Top = 840
Width = 855
End
Begin VB.TextBox txtid
Height = 285
Left = 3480
MousePointer = 3 'I-Beam
TabIndex = 21
Top = 480
Width = 855
End
Begin VB.TextBox txthomeroomeacher
Height = 285
Left = 2880
TabIndex = 20
Top = 2640
Width = 1455
End
Begin VB.TextBox txtcounselor
Height = 285
Left = 1800
TabIndex = 19
Top = 3000
Width = 2535
End
Begin VB.TextBox txtgpa
Height = 285
Left = 3480
TabIndex = 18
Top = 1200
Width = 855
End
Begin VB.Label Label14
Alignment = 2 'Center
BackColor = &H80000012&
Caption = "Grade"
BeginProperty Font
Name = "MS Sans Serif"
Size = 9.75
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H0000FF00&
Height = 255
Left = 1560
TabIndex = 39
Top = 1560
Width = 1815
End
Begin VB.Label Label8
Alignment = 2 'Center
BackColor = &H80000012&
Caption = "Homeroom Number"
BeginProperty Font
Name = "MS Sans Serif"
Size = 9.75
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H0000FF00&
Height = 255
Left = 1560
TabIndex = 29
Top = 1920
Width = 1815
End
Begin VB.Label Label19
Alignment = 2 'Center
BackColor = &H80000012&
Caption = "Class Rank"
BeginProperty Font
Name = "MS Sans Serif"
Size = 9.75
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H0000FF00&
Height = 255
Left = 2040
TabIndex = 27
Top = 840
Width = 1335
End
Begin VB.Label Label18
Alignment = 2 'Center
BackColor = &H80000012&
Caption = "Student ID Number"
BeginProperty Font
Name = "MS Sans Serif"
Size = 9.75
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H0000FF00&
Height = 255
Left = 1200
TabIndex = 25
Top = 480
Width = 2175
End
Begin VB.Label Label17
Alignment = 2 'Center
BackColor = &H00404040&
Caption = "Homeroom Teacher"
BeginProperty Font
Name = "MS Sans Serif"
Size = 9.75
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H0000FF00&
Height = 255
Left = 480
TabIndex = 24
Top = 2640
Width = 2415
End
Begin VB.Label Label16
Alignment = 2 'Center
BackColor = &H00000000&
Caption = "Counselor"
BeginProperty Font
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H0000FF00&
Height = 255
Left = 240
TabIndex = 23
Top = 3000
Width = 1455
End
Begin VB.Label Label13
Alignment = 2 'Center
BackColor = &H80000012&
Caption = "GPA"
BeginProperty Font
Name = "MS Sans Serif"
Size = 9.75
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H0000FF00&
Height = 255
Left = 2400
TabIndex = 22
Top = 1200
Width = 975
End
End
Begin VB.Frame Frame1
BackColor = &H80000007&
Caption = "Personal Information"
ForeColor = &H0000FF00&
Height = 3615
Left = 0
TabIndex = 0
Top = 120
Width = 4695
Begin VB.ComboBox Combo1
Height = 315
ItemData = "frmDatabase.frx":00E4
Left = 3360
List = "frmDatabase.frx":00F1
MousePointer = 6 'Size NE SW
TabIndex = 61
Text = "Gender"
Top = 840
Width = 1095
End
Begin VB.ComboBox Combo2
Height = 315
ItemData = "frmDatabase.frx":010E
Left = 1440
List = "frmDatabase.frx":01CF
TabIndex = 15
Top = 2640
Width = 2895
End
Begin VB.TextBox txtzip
Height = 285
Left = 3480
MaxLength = 5
TabIndex = 13
Top = 3120
Width = 855
End
Begin VB.TextBox txtage
Height = 285
Left = 3480
MaxLength = 2
TabIndex = 12
Top = 480
Width = 855
End
Begin VB.TextBox txtcity
Height = 285
Left = 1440
TabIndex = 11
Top = 2280
Width = 2895
End
Begin VB.TextBox txtstreet
Height = 285
Left = 1440
TabIndex = 10
Top = 1920
Width = 2895
End
Begin VB.TextBox txtlast
Height = 285
Left = 1200
TabIndex = 9
Top = 1200
Width = 1455
End
Begin VB.TextBox txtmiddle
Height = 285
Left = 1200
TabIndex = 8
Top = 840
Width = 1455
End
Begin VB.TextBox Txtfirst
Height = 285
Left = 1200
TabIndex = 7
Top = 480
Width = 1455
End
Begin VB.Label Label10
Alignment = 2 'Center
BackColor = &H80000012&
Caption = "State/ Province"
BeginProperty Font
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H0000FF00&
Height = 315
Left = -30
TabIndex = 16
Top = 2640
Width = 1365
End
Begin VB.Label Label9
Alignment = 2 'Center
BackColor = &H80000012&
Caption = "Zip Code"
BeginProperty Font
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H0000FF00&
Height = 255
Left = 2400
TabIndex = 14
Top = 3000
Width = 975
End
Begin VB.Label Label7
Alignment = 2 'Center
BackColor = &H80000012&
Caption = "City"
BeginProperty Font
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H0000FF00&
Height = 255
Left = 360
TabIndex = 6
Top = 2280
Width = 975
End
Begin VB.Label Label6
Alignment = 2 'Center
BackColor = &H80000012&
Caption = "Street"
BeginProperty Font
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H0000FF00&
Height = 255
Left = 360
TabIndex = 5
Top = 1920
Width = 975
End
Begin VB.Label Label4
Alignment = 2 'Center
BackColor = &H00000000&
Caption = "Age"
BeginProperty Font
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H0000FF00&
Height = 255
Left = 2640
TabIndex = 4
Top = 480
Width = 975
End
Begin VB.Label Label3
Alignment = 1 'Right Justify
BackColor = &H80000012&
Caption = "Last Name"
BeginProperty Font
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H0000FF00&
Height = 255
Left = 120
TabIndex = 3
Top = 1200
Width = 975
End
Begin VB.Label Label2
Alignment = 2 'Center
BackColor = &H80000012&
Caption = "Middle Name"
BeginProperty Font
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H0000FF00&
Height = 375
Left = 120
TabIndex = 2
Top = 720
Width = 975
End
Begin VB.Label Label1
Alignment = 1 'Right Justify
BackColor = &H80000012&
Caption = "First Name"
BeginProperty Font
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H0000FF00&
Height = 255
Left = 120
TabIndex = 1
Top = 480
Width = 975
End
End
Begin VB.Menu mnufile
Caption = "File"
Begin VB.Menu mnusave
Caption = "Save"
End
Begin VB.Menu mnusa
Caption = "Save As"
End
Begin VB.Menu mnuOpen
Caption = "Open"
End
Begin VB.Menu mnuExit
Caption = "Exit "
Shortcut = ^E
End
End
End
Attribute VB_Name = "frmINFO"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'JEARVON DHARRIE
'Database Project
' 1.Design a student record
' 2.Design a data entry from
' 3.Write "save" code
' 4.Write "load" code
' 5.Design report card form and write "print" code
' 6.Sub Function to compute year to date grades
' 7.Sub Function to compute GPA
'REQUIREMENTS'''''''''''''''''''''''''''''''
'Year to date grade automatically updates.
'If you try to retreive a record without a record number entered
' trap the error.
'GPA is the average of the 6 courses, updates automaticallly.
'5%, 10% weight on honors, AP, respectively.
'Compute class rank, compared to other people on file.
'Ease of use, enter through boxes, menu with hot keys.
'Use common dialog box.
'Save/ Save As option.
'Saving new file brings up Save As box.
'Minimum of 4 records.
'Grade report- honors/AP classes marked with stars.
''''''''''''''''''''''''''''''''''''''''''''
Dim filename As String
'Common dialog box
'''Private Type AddressRecord '62 Bytes
'' Street As String * 40
'' City As String * 15
'' State As String * 2
'' Zip As String * 5
'''End Type
''
''
''
''
'''Private Type Course '61 Bytes
'' Title As String * 20
'' credits As Single
'' courseNumber As String * 3
'' teacher As String * 20
'' kind As String * 1 'A, H, R (AP, Honors, Regular)
'' q1 As Integer
'' q2 As Integer
'' q3 As Integer
'' q4 As Integer
'' exam As Integer
'' ytd As Single
'' comment(2) As Integer
'''End Type
Private Type Student
lastName As String * 20
firstName As String * 20
middleName As String * 20
age As Integer
gender As String * 1
grade As Integer
rank As Integer
gpa As Single
homeroom As String * 4
hrTeacher As String * 20
counselor As String * 20
absent As Single
tardy As Integer
' class(9) As Course
idNumber As String * 5
Title As String * 20
credits As Single
courseNumber As String * 3
teacher As String * 20
kind As String * 1 'A, H, R (AP, Honors, Regular)
q1 As Integer
q2 As Integer
q3 As Integer
q4 As Integer
exam As Integer
ytd As Single
comment(2) As Integer
Street As String * 40
City As String * 15
State As String * 2
Zip As String * 5
End Type
Dim s As Student
Private Sub Combo1_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txtstreet.SetFocus
End If
End Sub
Private Sub Combo2_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txtzip.SetFocus
End If
End Sub
Private Sub mnuExit_Click()
Unload Me
End Sub
Private Sub mnuOpen_Click()
DIALOGS.ShowOpen
Open DIALOGS.filename For Random As #1 Len = Len(s)
s.idNumber = Val(txtid)
Get #1, s.idNumber, s
txtlast.Text = s.lastName
Txtfirst.Text = s.firstName
txtmiddle.Text = s.middleName
txtage = s.age
Combo1 = s.gender
'Combo2 = s.State
txtcity.Text = s.City
txtid.Text = s.idNumber
txtstreet.Text = s.Street
txtcounselor.Text = s.counselor
txthomeroomeacher.Text = s.hrTeacher
txthomeroom = s.homeroom
txtzip.Text = s.Zip
txtgrade(9).Text = s.grade
txtrank.Text = s.rank
For Index = 0 To 5
txtTeacher(Index).Text = s.teacher
Next Index
For Index = 0 To 5
txtClass(Index) = s.teacher
Next Index
For Index = 0 To 5
comboType(Index) = s.kind
Next Index
Close #1
End Sub
Private Sub mnusa_Click()
DIALOGS.ShowSave
Open DIALOGS.filename For Random As #1 Len = Len(s)
s.lastName = txtlast
s.idNumber = txtid
s.middleName = txtmiddle.Text
s.age = txtage
Put #1, s.idNumber, s
Close #1
End Sub
Private Sub mnusave_Click()
If filename = "" Then
DIALOGS.ShowSave
filename = DIALOGS.filename
End If
Open DIALOGS.filename For Random As #1 Len = Len(s)
s.lastName = txtlast
s.idNumber = txtid
s.middleName = txtmiddle.Text
s.firstName = Txtfirst
s.age = Val(txtage)
s.gender = Combo1
s.State = Combo2.DataField
s.City = txtcity.Text
s.Street = txtstreet.Text
s.Zip = txtzip.Text
s.counselor = txtcounselor.Text
s.hrTeacher = txthomeroomeacher.Text
s.grade = txtgrade(9)
s.rank = txtrank
s.homeroom = txthomeroom
For Index = 0 To 5
s.teacher = txtTeacher(Index)
Next Index
For Index = 0 To 5
s.Title = txtcalss(Index)
Next Index
For Index = 0 To 5
s.kind = comboType(Index)
Next Index
Put #1, s.idNumber, s
Close #1
End Sub
Private Sub txtage_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Combo1.SetFocus
End If
End Sub
Private Sub txtcity_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Combo2.SetFocus
End If
End Sub
Private Sub Txtfirst_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txtmiddle.SetFocus
End If
End Sub
Private Sub txtlast_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txtage.SetFocus
End If
End Sub
Private Sub txtmiddle_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txtlast.SetFocus
End If
End Sub
Private Sub txtstreet_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txtcity.SetFocus
End If
End Sub