open report of according with comb

fabiobarreto10

Registered User.
Local time
Yesterday, 20:37
Joined
Dec 28, 2011
Messages
45
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.
 
Does your report currently show all companies and the subreports show everything else? If so set the report data to use a query then on your form you can use the combo box as the query criteria. and then when you click your button it should show just the company information for that company you selected from the drop down.
 
Trevor, I took the line of code from a model, and was trying to open according
as a String instead of integer. Fix and it worked.

Thank you.
 

Users who are viewing this thread

Back
Top Bottom