try this:
If both files are available and no error occurs then the only other thing I can think of is that Datafiles(1) or another number is visible at the moment - I haven't used Crystal reports in about 2 years.VB Code:
if dir("D:\Sohrab\Multicompany\Dbs" & Newdatabase & ".mdb") = "" then msgbox "there is no such file available" stop end if if dir("D:\Sohrab\Multicompany\ Reports\ Report1.rpt") = "" then msgbox "there is no such file available" stop end if Cry1.DataFiles(0) = "D:\Sohrab\Multicompany\Dbs" & Newdatabase & ".mdb" Cry1.ReportFileName = "D:\Sohrab\Multicompany\ Reports\ Report1.rpt" Cry1.RetrieveDataFiles Cry1.Action = 1
Does this help
Rob




Reply With Quote