Here is my code to open a Crystal Report from VB. I do not want to have the user press a button to view the form, because it must be printed. I had to make the form not visible because it would show up instead of the report. I don't like how this is done though, because you can see the form for a split second. I also need to have the query, which is commented at the bottom, to run before the report is opened. Here is my code:

----------------------------------------------
Option Explicit

Dim CurrentReportPath As String
Dim strQuery As String

Private Sub Form_Activate()

frmCashOrderReport.Visible = False

End Sub

Private Sub Form_Load()

CrystalReport.ReportFileName = "I:\ATM Project\atmcashfunding.rpt"

CrystalReport.Connect = "DSN=Brick;UID=sa;PWD=;DSQ=;"

CrystalReport.WindowState = crptMaximized

CrystalReport.Action = 1

' strQuery = "SELECT * FROM dailyfunding " & _
' "WHERE orderdate = '" & sOrderDate & "' " & _
' "AND ATMID = '" & sOrderATMID & "' ;"


End Sub
-------------------------------------------

Any help would be appreciated!