vb6sux 0 Newbie Poster

I have the code

Dim cApp As CRAXDDRT.Application
Public cReport As CRAXDDRT.Report
Public CurrentTemplate As String
Dim ErrorMsg As String
'Dim ReportLayOut() As RptLayOut
Dim ErrorNo As Long
Dim ErrorModule As String


Private Sub Form_Load()

On Error GoTo PrintReportErr

With frmFolderDisplay
    .txtPath = GetSingleLUMSTREntry("OMU", "CRIT MATL 
                                 REPORTS", "PATH", "")
    .SetFilePath
    .Show vbModal
End With

Set cReport = cApp.OpenReport(CurrentTemplate)

When I get to the set cReport line, I get teh run-time error 91, object variable or With block variable not set.

Any ideas? This is driving me batty.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.