M
Mike Revis
Hi Group,
Access 2000, win xppro
I have never tried a subreport before although I can sort of find my way
around access and vba.
I am trying to get a subreport to show in a limited space on the main report
page header without pushing everything else down the page. I can't get the
placement right so I thought perhaps I might be able to do it through code.
The only field on the sub report is SalesOrder.
I am trying to accomplish something like this.
txtSomeCode = SomeCode & vbCrLf & subreport goes here
I have tried
Dim SO As SubReport
SO = Reports!rptMain!rptSub.Report!SalesOrder
txtSomeCode = SomeCode & vbCrLf & SO
This returns an error of object variable not defined.
Then I tried
txtSomeCode = SomeCode & vbCrLf & Reports!rptMain!rptSub.Report!SalesOrder
This returns the sales order number for the first record but not the second
or third etc. There can be several sales order numbers on one report.
This one would work fine if it returned all of the sales order numbers.
Then I tried
txtSomeCode = SomeCode & vbCrLf & Reports!rptMain!rptSub.Report
This returns a type mismatch error
As always any thoughts or suggestions are welcome.
Mike
Access 2000, win xppro
I have never tried a subreport before although I can sort of find my way
around access and vba.
I am trying to get a subreport to show in a limited space on the main report
page header without pushing everything else down the page. I can't get the
placement right so I thought perhaps I might be able to do it through code.
The only field on the sub report is SalesOrder.
I am trying to accomplish something like this.
txtSomeCode = SomeCode & vbCrLf & subreport goes here
I have tried
Dim SO As SubReport
SO = Reports!rptMain!rptSub.Report!SalesOrder
txtSomeCode = SomeCode & vbCrLf & SO
This returns an error of object variable not defined.
Then I tried
txtSomeCode = SomeCode & vbCrLf & Reports!rptMain!rptSub.Report!SalesOrder
This returns the sales order number for the first record but not the second
or third etc. There can be several sales order numbers on one report.
This one would work fine if it returned all of the sales order numbers.
Then I tried
txtSomeCode = SomeCode & vbCrLf & Reports!rptMain!rptSub.Report
This returns a type mismatch error
As always any thoughts or suggestions are welcome.
Mike