Postingan

Menampilkan postingan dari Desember, 2009

Get Date Range With DatePicker on Visualbasic6

'Made on 4th June 2009 BY Muh. Iqbal oo>LABQ5oo< Private Sub DTPEntered_Change() TxtDateEntered.Text = DTPEntered.Value End Sub Private Sub DTPEntered_Click() TxtDateEntered.Text = DTPEntered.Value End Sub Private Sub DTPReturn_Change() TxtDateReturn.Text = DTPReturn.Value SQLQuery End Sub Private Sub DTPReturn_Click() TxtDateReturn.Text = DTPReturn.Value SQLQuery End Sub Private Sub TxtDateEntered_Change() If DTPEntered.Value > DTPReturn.Value Then MsgBox "Date entered must be less than or " & vbCrLf & _ "equal to the date of return",vbExclamation DTPReturn.Value = DTPEntered.Value End If End Sub Private Sub TxtDateReturn_Change() If DTPReturn.Value < DTPEntered.Value Then MsgBox "Date of return must be more or " & vbCrLf & _ "equal to the date of entry",vbExclamation DTPEntered.Value = DTPReturn.Value End If End Sub 'Query is Used Sub SQLQuery() Dim RSZZ As New ADODB.Record

Mencari Jumlah Rekord Pada VB6

Dim RSViewer As New ADODB.Recordset Dim MySQL As String Dim i As Integer Dim JmlSiswaDiTerima As String MySQL= "SELECT NIS FROM Tab_SiswaPKL WHERE Tab_SiswaPKL.Status='Diterima' " Set RSViewer = New ADODB.Recordset RSViewer.Open MySQL, DbAcax, adOpenKeyset, adLockOptimistic If RSViewer.BOF = True And RSViewer.EOF = True Then MsgBox "Database Kosong", vbOKOnly + vbInformation Exit Sub End If RSViewer.MoveFirst For i = 0 To RSViewer.RecordCount - 1 RSViewer.GetRows = i Next i = i JmlSiswaDiTerima = i JmlSiswaDiTerima = Format(JmlSiswaDiTerima, "###,###,##0") TxtSiswaDiterima.Text = i & " Siswa" TxtSiswaDiterima.Locked = True Set RSViewer = Nothing

LabQ5 Icone

Download Icon