Log in

View Full Version : Open report in accordance with combo



fabio2012
05-23-2012, 09:04 AM
Friends, I am trying to create a report with many fields and tables of different (but related).
As I have many fields, had to do subreports so that the fields to print perfectly.
I have a button on a form, and I'm trying to open the report in accordance with each company that is
selected in a combo.
Before I had a report that I opened with this line of code:

DoCmd.OpenReport "steps", acViewPreview, , "[CompanyID]='" & Me.combCompany.[Column](0) & "'"
But now, as I have subreports this code does not work.
Does anyone have any tips?
Thank you.

HiTechCoach
05-25-2012, 12:36 PM
But now, as I have subreports this code does not work.
Does anyone have any tips?


That would indicate that you sub reports are not properly linked to thr parent report.

For th4 sub report control, what do you have in the master and child linking field properties?

fabio2012
05-25-2012, 05:56 PM
HiTechCoach, thanks for responding and helping. I was trying to open a whole with a string. Correct and it worked perfectly.

Thank you.

HiTechCoach
05-28-2012, 05:15 PM
Thanks for the update and your solution. :bow:

Glad to hear you got it resolved.:thumb