| | |
MSFlexGrid Keyword Filtering
![]() |
•
•
Join Date: Aug 2008
Posts: 28
Reputation:
Solved Threads: 0
Hello everybody.. I have a form in my project, that's having a Grd name MSFlexGrid and a Data1. Besides, it also have a cmdCalculate and cmdExit button. Their codes are below.
Above are only my descriptions of my form. My real problem is, I need to do some filtering to the Data1 shown in MSFlexGrid (Grd namely), so that it only shows the data of keyword that i need. For example, the keyword "Medical". Do i need to add a Combo1 on the form, and some codings? Could u Geeks plz give me the codes? Plz help me..
Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
Private Sub cmdCalculate_Click() Dim i As Integer Dim TAmt As Currency TAmt = 0 For i = 1 To Grd.Rows - 1 TAmt = TAmt + Val(Grd.TextMatrix(i, 6)) Next TAmt = Val(txtBudget09.Text) - TAmt txtBalance.Text = Format(TAmt, "0.00") End Sub
Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
Private Sub cmdExit_Click() Data1.UpdateControls Unload Me Form7.Show End Sub
Above are only my descriptions of my form. My real problem is, I need to do some filtering to the Data1 shown in MSFlexGrid (Grd namely), so that it only shows the data of keyword that i need. For example, the keyword "Medical". Do i need to add a Combo1 on the form, and some codings? Could u Geeks plz give me the codes? Plz help me..
•
•
Join Date: Aug 2008
Posts: 28
Reputation:
Solved Threads: 0
Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
Private Sub cmdPapar_Click() If optall.Value = True Then Data1.RecordSource = "SELECT Hari, Bulan, ID, Kategori, Status, Jumlah_lulus, Nama FROM permohonan" Data1.Refresh Grd.Visible = True Else Data1.RecordSource = "SELECT Hari, Bulan, ID, Kategori, Status, Jumlah_lulus, Nama FROM permohonan where Hari = " & " '" & txtHari & "'" Data1.Refresh Grd.Visible = True End If End Sub
I've got this, and applied it, and it works! But, could anybody show me, how to do double filtering simultaneously? Plz....
![]() |
Other Threads in the Visual Basic 4 / 5 / 6 Forum
- Previous Thread: Query date range help pls...
- Next Thread: need help with my game.
| Thread Tools | Search this Thread |
* 6 429 2007 access activex add age application basic beginner birth bmp calculator cd cells.find click client code college component connection connectionproblemusingvb6usingoledb copy creat ctrl+f data database datareport date delete dissertations dissertationthesis dissertationtopic edit error excel excelmacro file filename form hardware header iamthwee image inboxinvb internetfiledownload keypress label listbox listview liveperson login looping machine microsoft movingranges number objectinsert open oracle password prime program prompt range-objects readfile reading record refresh remotesqlserverdatabase report save search sendbyte sites sort sql sql2008 sqlserver subroutine tags textbox time urldownloadtofile vb vb6 vb6.0 vba visual visualbasic visualbasic6 web window windows





