I would like to reference the Primary key on the continuous long summary report on my VBA code see below so that I get the correct results per total. The report was combined using domain functions, there is no ISSUE here in terms of performance all is perfect even if there are huge queries to do the actual calculations
The report has grouped sales data for each salesman coming from un related tables & queries, thanks the domain functions has helped to construct this report accurately and with quality performance.
I want now to have the final total for all salesmen, but if I reference the subtotal per each salesman, it only picks the value for the first salesman throughout, that is why I want to reference the primary which is based from the salesmen table and visible on the report. On the report I’m using this code below onload event:
Me.txtsalestotal = Me.finalTotal
I'm putting the code above behind the report , but it keeps on picking the same value for one salesman to all salesmen, that i why a primary key referencing is required here.
I think if I can be helped to know how to reference the primary key ( which is Visible on the report) on the above code, then it will sort out this problem for good.