Hello,
I will try my best to explain.
I have a main Recipe report that contains two sub reports (one sub report contains the list of ingredients needed, and the other sub report contains the QC checks needed for the recipe). Both of these are linked to the main report with parent/child relationships.
When entering the ingredients, there is the choice to have all the ingredients on the main (major) recipe; and the option to mix some of the ingredients separately (dry setup, wet setup, etc.) - these are categorized as "types". So, when the report opens there may be only one report (if there is only one type), or there may be multiple report pages (if there is more than one type - i.e. dry setup and major). There is ALWAYS a major type. There may be many other types.
The issue I'm having is that when there are multiple reports (when there are more than one "type"), I only want the one sub report that contains the QC checks to be visible on the main report and hidden on the other reports (dry setup, wet setup, etc.). This is because the QC checks are only to be done once.
I've searched the internet and this website and can't seem to get the answer I need. This is the code I've used (in different variations depending on where I placed it). I've tried putting it on the QC checks sub report in different locations; also tried putting it on the main report in different locations. Nothing did the trick.
If Me.[txtRecipeMix].value = "major" then
Me.Child.[Report]![R_Recipes_Checks Subreport].Visible = True
Else
Me.Child.[Report]![R_Recipes_Checks Subreport].Visible = False
End If
End Sub
Any suggestions would be greatly appreciated. Thank you.
I will try my best to explain.
I have a main Recipe report that contains two sub reports (one sub report contains the list of ingredients needed, and the other sub report contains the QC checks needed for the recipe). Both of these are linked to the main report with parent/child relationships.
When entering the ingredients, there is the choice to have all the ingredients on the main (major) recipe; and the option to mix some of the ingredients separately (dry setup, wet setup, etc.) - these are categorized as "types". So, when the report opens there may be only one report (if there is only one type), or there may be multiple report pages (if there is more than one type - i.e. dry setup and major). There is ALWAYS a major type. There may be many other types.
The issue I'm having is that when there are multiple reports (when there are more than one "type"), I only want the one sub report that contains the QC checks to be visible on the main report and hidden on the other reports (dry setup, wet setup, etc.). This is because the QC checks are only to be done once.
I've searched the internet and this website and can't seem to get the answer I need. This is the code I've used (in different variations depending on where I placed it). I've tried putting it on the QC checks sub report in different locations; also tried putting it on the main report in different locations. Nothing did the trick.
If Me.[txtRecipeMix].value = "major" then
Me.Child.[Report]![R_Recipes_Checks Subreport].Visible = True
Else
Me.Child.[Report]![R_Recipes_Checks Subreport].Visible = False
End If
End Sub
Any suggestions would be greatly appreciated. Thank you.