zelarra821
Registered User.
- Local time
- Today, 16:11
- Joined
- Jan 14, 2019
- Messages
- 803
Good Morning
I have a report with a subreport, and I want, depending on whether it is a budget or an invoice, that I change the recordsource of both the parent report and the subreport. I did this with the parent report, but the subreport gives me the error: "Unable to set record source property in print preview mode, even after printing has started."
This is the code that I have put in the subreport:
I honestly don't know what's wrong, because I have it in another database like that, and it works correctly.
Do you know what may be happening and how to fix it?
Thank you very much.
I have a report with a subreport, and I want, depending on whether it is a budget or an invoice, that I change the recordsource of both the parent report and the subreport. I did this with the parent report, but the subreport gives me the error: "Unable to set record source property in print preview mode, even after printing has started."
This is the code that I have put in the subreport:
Code:
Private Sub Report_Open(Cancel As Integer)
Me.RecordSource = "SELECT TFacturasSubtabla.CodigoFactura, TFacturasSubtabla.ID, TFacturasSubtabla.Caracteristicas, TFacturasSubtabla.Imagen" _
& " FROM TFacturasSubtabla WHERE " & Me.Parent.Filter
Me.GroupLevel(0).ControlSource = "CodigoFactura"
End Sub
I honestly don't know what's wrong, because I have it in another database like that, and it works correctly.
Do you know what may be happening and how to fix it?
Thank you very much.
Last edited: