Appropriate Event: On Print (detail), On load (Report)

G

G

Hello. Trying to determine the right event to accomplish my desired result.

I have a report ,and linked sub report, each built on their own queries. I
would like to determine the value of a field in the subreport, then adjust a
value in an unbound text box on the detail of the main report. The logic
needs to be applied ,and the field value adjusted, on each page.

Currently I am using the On Print event of the main report, but do not seem
to be getting the desired result.
I do not think that the OnOpen can work, as the data wont yet be there from
the underlying query. Any advice. Thanks.

Here is a code snippet
Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer)
If [Reports]![Rpt_kanbanRIPbyAssyID]![Rpt_GrossReqQty]!KBSize > 5 And
[Reports]![Rpt_kanbanRIPbyAssyID]![Rpt_GrossReqQty]!KBSize <= 6 Then
[Reports]![Rpt_kanbanRIPbyAssyID]!SMARTY = "btwn 5 and 6"
End If
End Sub

Rpt_kanbanRIPbyAssyID is the Main report.
Rpt_GrossReqQty is the Sub Report
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top