HI,
I am creating a report and I need to count items in a section I have divided the report as follows:
Page Header
Client Number Header (This is a group)
Details
. [Stock Type] these are a text boxes
. [Stock Name]
. [Stock amount]
.
Client Number Footer
Here there is a text called [Count Stock]
Page Footer
I want to display in the [Count Stock] field the number of stocks that I have, but not all stocks there is one specific stock type I want to type, the stock types are: type1, type2 and type3. So i want to display for each client in the client number footer how many stocks type1 are there.
I need to do so because if the client has more that two stocks Type1 then there are certain stocks where I have to multiply its amount by 0.5.
So Ex: lets say i have Three stocks of Type1. The stock names are Name1, Name2 and Name3. After I have found that I have three stocks of Type1 I have to check which is the Stock which name is Name1 or Name2 and multiply their amount by 0.5...
How do I go through the items in a section in VBA in order to check the values of the textboxes as the report is Formatted. I guess I have to write the code in the condition of called "onFormat"
thanks
Start Free Trial