I've just discovered another way to do it:
VB Code:
  1. Option Explicit
  2.  
  3. Dim Report As New CrystalReport1
  4. [color=red]Dim crProp As CRAXDRT.ConnectionProperties[/color]
  5.  
  6. Private Sub Form_Load()
  7.  
  8.     Screen.MousePointer = vbHourglass
  9.    
  10.     [color=red]Set crProp = Report.Database.Tables(1).ConnectionProperties
  11.     crProp.Item("Database Name") = App.Path & "\mydb.mdb"
  12.     crProp.Item("Database Password") = "mypassword"[/color]
  13.    
  14.     Report.RecordSelectionFormula = "{mytable.myfield}='condition'"
  15.    
  16.     CRViewer91.ReportSource = Report
  17.     CRViewer91.ViewReport
  18.     Screen.MousePointer = vbDefault
  19.  
  20. End Sub
Download this document from the Crystal web site:
http://support.businessobjects.com/c...erties.pdf.asp
It explains it all pretty well.