A1VBCode Forums

Crystal Report


http://www.a1vbcode.com/vbforums/Topic29282.aspx

By zieqco - 5/13/2010

dear all,

ihave tried this code to open my crystal report, but this code dont work. I use ms Acces with password protected. this is my code I use :

With crBayar

.ReportFileName = App.Path & "\Report\BAYAR.rpt"

.Connect = App.Path & "\data\finance.mdb"

.DiscardSavedData = True

.RetrieveDataFiles

.DiscardSavedData = True

.ReplaceSelectionFormula ("{Tb_Bayar.Bayar} >=" & Val(txtTotalFrom) & " and {Tb_Bayar.Bayar} <=" & Val(txtTotalto) & "")

.Destination = crptToWindow

.PrintFileType = crptCrystal

.WindowState = crptMaximized

.WindowMaxButton = False

.WindowMinButton = False

.Action = 1

End With



please help me, asa soon as posible