Advertisement

07.22.2008 at 09:04AM PDT, ID: 23585552
[x]
Attachment Details

How do I count the items in a group in VBA

Asked by ramimassoud in Access Reports, Microsoft Access Database, Access Coding/Macros

Tags: , , ,

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"

thanksStart Free Trial
[+][-]07.22.2008 at 09:50AM PDT, ID: 22061259

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.22.2008 at 10:51AM PDT, ID: 22061844

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.23.2008 at 03:11AM PDT, ID: 22067550

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.24.2008 at 07:06AM PDT, ID: 22079227

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Access Reports, Microsoft Access Database, Access Coding/Macros
Tags: Microsoft, Office, 2000, Access
Sign Up Now!
Solution Provided By: omgang
Participating Experts: 1
Solution Grade: A
 
 
[+][-]07.24.2008 at 08:36AM PDT, ID: 22080334

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.24.2008 at 08:47AM PDT, ID: 22080460

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.24.2008 at 09:07AM PDT, ID: 22080701

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.24.2008 at 10:44AM PDT, ID: 22081651

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08.21.2008 at 06:19PM PDT, ID: 22285640

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 7-day free trial to view this Administrative Comment or ask the Experts your question.

 
[+][-]08.28.2008 at 02:00AM PDT, ID: 22332687

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 7-day free trial to view this Administrative Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628