0% found this document useful (0 votes)
11 views

Damely 32

Uploaded by

Troy Briggs
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views

Damely 32

Uploaded by

Troy Briggs
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 3

Private Sub MostrarTodos()

LimpioFlex
AbrirBase
Dim strSql As String
strSql = "SELECT * FROM Articulos"
Dim rs As New Recordset
rs.Open strSql, DB, adOpenKeyset, adLockOptimistic, adCmdText
Do While Not rs.EOF
i = i + 1
linea = rs!id _
& Chr(9) & rs!Descripcion _
& Chr(9) & rs!Marca _
& Chr(9) & rs!Talle _
& Chr(9) & Format(rs!Precio, "Fixed")
MSHFlexGrid1.AddItem linea, i
rs.MoveNext
Loop
lblTotalRef = rs.RecordCount
CerrarBase
AutoFlex MSHFlexGrid1
End Sub
Private Sub LimpioFlex()
titulos = " Codigo.|Descripcin|Color|Talle|Precio"
With MSHFlexGrid1
.Clear
.Rows = 2
.FixedRows = 1
.Col = 0
.ColSel = 0
.Row = 1
.RowSel = 1
.FormatString = titulos
.Visible = True
.AllowBigSelection = True
.AllowUserResizing = flexResizeColumns
.SelectionMode = flexSelectionByRow
End With
End Sub
Private Sub showMaster()
Dim res As Recordset
Dim rflag As Boolean
Dim m As ListItem
'values for counting
Dim countF As Integer
Dim countcs As Integer
Dim countIT As Integer
Dim countDCET As Integer
Dim countDEP As Integer
Dim countNUR As Integer
Dim countCCT As Integer
Dim countHRM As Integer
Dim countCoE As Integer
Dim countOTher As Integer
Set res = New Recordset
Set Cmaster = New clsMaster
rflag = Cmaster.getAllList(res)
If rflag Then
Do While Not (res.EOF Or res.BOF)
Set m = Me.listStudents.ListItems.Add(, , res.Fields("Studentno"))
m.SubItems(1) = res.Fields("Lname")
m.SubItems(2) = res.Fields("Fname")
m.SubItems(3) = res.Fields("MI")
m.SubItems(4) = res.Fields("Sex")
m.SubItems(5) = res.Fields("Address")
m.SubItems(6) = res.Fields("Contactno")
m.SubItems(7) = res.Fields("School")
m.SubItems(8) = res.Fields("Course")


If res.Fields("sex") = "F" Then
countF = countF + 1
End If

If res.Fields("Course") = "BSCS" Then
countcs = countcs + 1
End If

If res.Fields("Course") = "BSIT" Then
countIT = countIT + 1
End If

If res.Fields("Course") = "DEP" Then
countDEP = countDEP + 1
End If

If res.Fields("Course") = "BSN" Then
countNUR = countNUR + 1
End If

If res.Fields("Course") = "DCET" Then
countDCET = countDCET + 1
End If

If res.Fields("Course") = "CCT" Then
countCCT = countCCT + 1
End If

If res.Fields("Course") = "HRM" Then
countHRM = countHRM + 1
End If

If res.Fields("Course") = "CoE" Then
countCoE = countCoE + 1
End If

If res.Fields("Course") = "-" Then
countOTher = countOTher + 1
End If



res.MoveNext
Loop
End If
'display counts
Me.lblTS.Caption = Me.listStudents.ListItems.Count
Me.lblF.Caption = countF
Me.lblM.Caption = Me.lblTS - countF
Me.lblCS.Caption = countcs
Me.lblIT.Caption = countIT
Me.lblDEP.Caption = countDEP
Me.lblDCET.Caption = countDCET
Me.lblBSN.Caption = countNUR
Me.lblCCT.Caption = countCCT
Me.lblHRM.Caption = countHRM
Me.lblCoe.Caption = countCoE
Me.lblOther.Caption = countOTher
End Sub

You might also like