Sub Report in a Form (1 Viewer)

itownson1

Registered User.
Local time
Today, 13:40
Joined
Mar 20, 2019
Messages
43
I have a "Stock Check" report that has a running sum and has a filter attached to it.
Works perfectly.

I also have a form that allows the user to adjust the stock level.

What I want is to put the report as a subreport into the form, so the user can see the current stock level.
I have the report in as a subreport but am struggling to link the two together.

When I open the form it asks for the product code, which is through the query attached to the report. So I get the right data in the subreport, but the fields in the form are blank waiting for me to fill them in. Is it possible to get the supplier and product field to get its data from the subreport?

Hope that makes sense.
 

Ranman256

Well-known member
Local time
Today, 16:40
Joined
Apr 9, 2015
Messages
4,339
Sub forms go in forms.
Sub reports go in reports.
You can open a report to show the same data as the form,
Open the report using the where clause,
Docmd.openreport....
 

June7

AWF VIP
Local time
Today, 12:40
Joined
Mar 9, 2014
Messages
5,463
I have displayed a report on a form but did not use master/child links nor filter. Not quite clear to me what is happening in your case. I don't use dynamic parameterized queries.

If you want to provide db for analysis, follow instructions at bottom of my post.
 

theDBguy

I’m here to help
Staff member
Local time
Today, 13:40
Joined
Oct 29, 2018
Messages
21,447
Is it possible to get the supplier and product field to get its data from the subreport?

Hope that makes sense.
Sounds like this might be possible if you leave the subreport unlinked to the form. By the time the form loads, the subreport should have its data available for you to grab and apply to the form.
 

Users who are viewing this thread

Top Bottom