| | |
Plz fix my msflexgrid search codes
Please support our Visual Basic 4 / 5 / 6 advertiser: Programming Forums - DaniWeb Sister Site
Thread Solved |
•
•
Join Date: Aug 2008
Posts: 28
Reputation:
Solved Threads: 0
Hello everybody.. I have tried to use these codes that I got from a book. I'm using MSFlexGrid, with the Grd name. It was set to be invisible (false visible). And when i enter the year (tahun) needed in the "txttahun" textbox, it will only show the data that related data.
But, my problem is, when i tried to run it, it dispalys "Error run-time 3061, too few parametes, expected 1." and it debugged at "Data1.Refresh" part of codes. Could anybody here plz correct it, or tell me what i need to do.
Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
Private Sub cmdPapar_Click() If optall.Value = True Then Data1.RecordSource = "SELECT Hari, Bulan, Tahun, ID, Kategori, Status, Jumlah_lulus, Nama FROM permohonan" Data1.Refresh Grd.Visible = True End If If optbyyear.Value = True And txttahun.Text = "2009" Then Data1.RecordSource = "SELECT Hari, Bulan, Tahun, ID, Kategori, Status, Jumlah_lulus, Nama FROM permohonan where Tahun = " & " '" & txttahun & "'" Data1.Refresh Grd.Visible = True txtAlatulis09.Visible = True End If If optbyyear.Value = True And txttahun.Text = "2010" Then Data1.RecordSource = "SELECT Hari, Bulan, Tahun, ID, Kategori, Status, Jumlah_lulus, Nama FROM permohonan where Tahun = " & " '" & txttahun & "'" Data1.Refresh Grd.Visible = True txtAlatulis10.Visible = True End If End Sub
But, my problem is, when i tried to run it, it dispalys "Error run-time 3061, too few parametes, expected 1." and it debugged at "Data1.Refresh" part of codes. Could anybody here plz correct it, or tell me what i need to do.
![]() |
Other Threads in the Visual Basic 4 / 5 / 6 Forum
- Previous Thread: how I pass text directly in data report
- Next Thread: System beep not loud!
Views: 529 | Replies: 1
| Thread Tools | Search this Thread |
Tag cloud for Visual Basic 4 / 5 / 6
* 6 429 2007 access activex add age append application basic beginner birth bmp c++ calculator cd cells.find click client code college column 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 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 retrieve save search sendbyte sites sort sql sql2008 sqlserver struct subroutine table tags time timer urldownloadtofile vb vb6 vb6.0 vba visual visualbasic visualbasic6 web window windows





I have put 'kategori', a field that is not in the data1 itself. Haha! 