I have a report that is generated based on the Active X calander day chosen. It works great so far, you pick the day, and hit print. Simple, right? Well I am trying to add a second query to the mix that would que up a sub report on the main report. The main report contains all the business information, the sub report contains all the people who worked that day and that comes off of a separate query (count # query).
Here is the code that I run when you push the 'print' button:
strFilter = "[Date] = # & calPickADay.Value & "#"
strDocName = "rptBusinessReport"
DoCmd.OpenReport strDocName, acViewPreview, , strFilter
I tried to add another strFilter to make the sub query use the specified calander date from the Active X calander, and I assumed it would query and then the sub report would match the main report but it doesn't work.
The other thing I tried was to add a similar 'docmd' line, but it opened th sub report as it's own report and I don't want that, I wanted it to open as the sub report.
Can anyone help me?
Here is the code that I run when you push the 'print' button:
strFilter = "[Date] = # & calPickADay.Value & "#"
strDocName = "rptBusinessReport"
DoCmd.OpenReport strDocName, acViewPreview, , strFilter
I tried to add another strFilter to make the sub query use the specified calander date from the Active X calander, and I assumed it would query and then the sub report would match the main report but it doesn't work.
The other thing I tried was to add a similar 'docmd' line, but it opened th sub report as it's own report and I don't want that, I wanted it to open as the sub report.
Can anyone help me?