Voting System

Topics: Vector space, Field, Cyclic group Pages: 4 (338 words) Published: September 15, 2013
Dim rowx As Integer, colx As Integer
Dim rs As New ADODB.Recordset
Dim con As New ADODB.Connection

Public Sub connectdbase()

If con.State = 0 Then
con.Open "Provider=Microsoft.Jet.OLEDB.4.0;" _
& "Data Source=" & App.Path & "\database\ccvvfvc.mdb" End If

End Sub

Sub setupFlex()
With MSFlexGrid1
.Rows = 2
.Cols = 10
.RowHeightMin = 315

.TextMatrix(0, 1) = "Student No"
.TextMatrix(0, 2) = "Student Name"
.TextMatrix(0, 3) = "Prelim"
.TextMatrix(0, 4) = "Midterm"
.TextMatrix(0, 5) = "Prefinal"
.TextMatrix(0, 6) = "Final"
.TextMatrix(0, 7) = "Subject Grade"
.TextMatrix(0, 8) = "PTS. Equivalent"
.TextMatrix(0, 9) = "Remarks"

.ColWidth(0) = 800
.ColWidth(1) = 1000
.ColWidth(2) = 2000
.ColWidth(3) = 1000
.ColWidth(4) = 1000
.ColWidth(5) = 1000
.ColWidth(6) = 1000
.ColWidth(7) = 2000
.ColWidth(8) = 2000
.ColWidth(9) = 1500

End With
End Sub

Private Sub cmdAdd_Click()
MSFlexGrid1.AddItem ""
End Sub

Private Sub Form_load()
setupFlex
connectdbase

Set rs = con.Execute("Select studentNo,studname from tblstudentinfo") If Not rs.EOF Then
While Not rs.EOF
With MSFlexGrid1
.TextMatrix(.Rows - 1, 1) = rs.Fields(0)
.TextMatrix(.Rows - 1, 2) = rs.Fields(1)

rs.MoveNext
.AddItem ""
End With
Wend
End If
End Sub

Private Sub MSFlexGrid1_KeyPress(KeyAscii As Integer)
rowx = MSFlexGrid1.Row
colx = MSFlexGrid1.Col

If KeyAscii = 13 Then
If colx >= 3 And colx <= 6 Then
With TxtInput
.Left = MSFlexGrid1.CellLeft + MSFlexGrid1.Left
.Top = MSFlexGrid1.CellTop +...
Continue Reading

Please join StudyMode to read the full document

You May Also Find These Documents Helpful

  • Essay about Voting System
  • Political Parties, Party and Electoral Systems, and Voting Behavior in the Uk Essay
  • Election System Essay
  • Essay on Federal Republic of Germany: How the Principle of Consensus Manifests in the Political System
  • The first past the post electoral system does more harm than good. Discuss. Essay
  • Voting System Essay
  • Voting System Essay
  • Automated Voting System Essay

Become a StudyMode Member

Sign Up - It's Free