Solved Change SubForm SourceObject to Report

Extra_Cover

Registered User.
Local time
Today, 12:41
Joined
Oct 21, 2008
Messages
71
I would like to change the source object of a subform to a report. I have tried the following, which works when using forms.

Code:
        stDocName = "Rpt_DOI_Summary"
        Forms!Frm_MainMenu.SubFrmOption.SourceObject = stDocName
        Forms!Frm_MainMenu.SubFrmOption.SetFocus

I get the following error 'The settings you entered isn't valid for this property'

Does anyone know if this is possible?
 
dont put Reports in subforms. Put subForms in forms. (and subReports in Reports)

stDocName = "FRM_DOI_Summary"

Just Open a report.
 
Yes, you can put a report in a form.
It is a good way of displaying data where you want the display to be able to expand with the amount of text.
Great for continuous forms where you don't need to edit the data.

The source object needs to be referred to including the reference to the report object;

SourceObject = "Report.Rpt_DOI_Summary"
 
Last edited:
The source object needs to be referred to including the reference to the report object;

SourceObjet = "Report.Rpt_DOI_Summary"


I didn't know this! Thank you!
 
Although I don't often do so, you can also use a form as a subreport.
One reason for doing this is that disconnected ADO recordsets can be used in forms but not in reports.

However, when using forms in reports and vice versa, the functionality will not the same as when those objects are used 'normally'
 
Yes, you can put a report in a form.
It is a good way of displaying data where you want the display to be able to expand with the amount of text.
Great for continuous forms where you don't need to edit the data.

The source object needs to be referred to including the reference to the report object;

SourceObject = "Report.Rpt_DOI_Summary"
Many thanks. This is exactly what i want to do.
 

Users who are viewing this thread

Back
Top Bottom