Hi, I'm developing an application with VB 6, CR 8.5 and MS Access 97. I made over than 30 reports, but one of these return me the error code 500 (Not enough memory)!!
The problem is also that the report is called in two parts of the code. One's work fine, the other no. This is the code that don't work:
Case 19 'Munition Characteristic
.PrintFileName = myDirectory & "\" & SelItem & "_" & Filename & ".rtf"
.ReportFileName = App.Path & "\Report\VLU\VLUMunitionChar.rpt"
.DataFiles(0) = MyDB.Name
.ReplaceSelectionFormula ("{VLU_MUNITION_CHARCTER.obj_id}='" & Dettaglio & "' ")
.PrintReport
j = .LastErrorNumber
MsgBox .LastErrorString
This is the code that work fine:
Case RPT_TYPE_VLU_MUNCHAR
Filename = Replace(SelItem, "\", "-")
With rptControl
.DiscardSavedData = True
.PrintFileName = myDirectory & "\" & Filename & ".rtf"
.ReportFileName = App.Path & "\Report\VLU\VLUMunitionChar.rpt"
.DataFiles(0) = MyDB.Name
.ReplaceSelectionFormula ("{VLU_MUNITION_CHARACTER.obj_id}='" & SelItem & "'")
.PrintReport
End With
Do you see some difference??? I don't
Ciao da
N@poleone
The problem is also that the report is called in two parts of the code. One's work fine, the other no. This is the code that don't work:
Case 19 'Munition Characteristic
.PrintFileName = myDirectory & "\" & SelItem & "_" & Filename & ".rtf"
.ReportFileName = App.Path & "\Report\VLU\VLUMunitionChar.rpt"
.DataFiles(0) = MyDB.Name
.ReplaceSelectionFormula ("{VLU_MUNITION_CHARCTER.obj_id}='" & Dettaglio & "' ")
.PrintReport
j = .LastErrorNumber
MsgBox .LastErrorString
This is the code that work fine:
Case RPT_TYPE_VLU_MUNCHAR
Filename = Replace(SelItem, "\", "-")
With rptControl
.DiscardSavedData = True
.PrintFileName = myDirectory & "\" & Filename & ".rtf"
.ReportFileName = App.Path & "\Report\VLU\VLUMunitionChar.rpt"
.DataFiles(0) = MyDB.Name
.ReplaceSelectionFormula ("{VLU_MUNITION_CHARACTER.obj_id}='" & SelItem & "'")
.PrintReport
End With
Do you see some difference??? I don't
Ciao da
N@poleone