Coba seperti ini ya! semoga tidak salah:
Copy code dibawah ini ke programnya Mas.
str = "{pembelian.tgl_beli} >= DateTime(" & Year(DTPicker1) & ", " &
Month(DTPicker1) & ", " & Day(DTPicker1) & ",00, 00, 00) and
{pembelian.tgl_beli} <= DateTime(" & Year(DTPicker2) & ", " &
Month(DTPicker2) & ", " & Day(DTPicker2) & ",00, 00, 00)"
2008/6/24, iwan gunawan <[EMAIL PROTECTED]>:
>
> Thanks, mas frabgky tanggapannya, sy ada contoh koding yg databasenya
> pake sql.
> Nah sy pengen database pake acces, dimn koding yg hrs dirubah, thanks.
> Ini contohnya :
>
> Dim Report As New CrystalReport2
>
> Private Sub Command1_Click()
> Dim str As String
> str = "{pembelian.tgl_beli}>#" & Format(DTPicker1.Value, "MM-DD-YYYY") & "#
> and {pembelian.tgl_beli}< #" & Format(DTPicker2.Value, "MM-DD-YYYY") & "#"
> Report.RecordSelectionFormula = str
> Report.ReadRecords
> CRViewer1.Refresh
> End Sub
>
> Private Sub Form_Load()
> Screen.MousePointer = vbHourglass
> CRViewer1.ReportSource = Report
> CRViewer1.ViewReport
> Screen.MousePointer = vbDefault
>
> End Sub
>
> Private Sub Form_Resize()
> CRViewer1.Top = 1200
> CRViewer1.Left = 0
> CRViewer1.Height = ScaleHeight
> CRViewer1.Width = ScaleWidth
>
> End Sub
>
> ----- Original Message ----
> From: Frangky id <[EMAIL PROTECTED]>
> To: [email protected]
> Sent: Monday, June 23, 2008 6:29:45 PM
> Subject: Re: [Programmer-VB] CR REPORT
>
> crRekeningKoran. SelectionFormula = "{QREKAPNAMA BYTGL.Tgl} >= DateTime("
> & Year(DTPicker1) & ", " & Month(DTPicker1) & ", " & Day(DTPicker1) & ",00,
> 00, 00) and {QREKAPNAMA BYTGL.Tgl} <= DateTime(" & Year(DTPicker2) & ", " &
> Month(DTPicker2) & ", " & Day(DTPicker2) & ",00, 00, 00)"
>
> Pada tanggal 23/06/08, iwan gunawan <[EMAIL PROTECTED] com<[EMAIL PROTECTED]>>
> menulis:
>>
>> Guys, need help neh.
>> Gw dah bikin repot pake CR 8.5, and dah bikin crview di form vb.
>> Nah gw mau repot itu keluarnya dr tgl.... sampe tgl....
>> Di form gw dah bikin dtp1, dtp2 sama cmdpreview.
>> ksh contoh donk kodingnya, gw pake mdb databasenya, thanks.
>>
>>
>
>
>
>