how to count a list of items?

chan0210

Registered User.
Local time
Tomorrow, 01:14
Joined
Feb 28, 2007
Messages
23
Hi,

In my form, there is a field that comprises of a list of items and these items may repeat at times. which means, if i have a list consist of apples, pear, apples, grapes. The sum of the fruits should be 3 fruits instead of 4.
how do i write the code at the textbox which sums the list of items in that field?
 
It is a big mistake to put more value in a field.
In one field ONLY ONE VALUE.
 
It is a big mistake to put more value in a field.
In one field ONLY ONE VALUE.

Hi..

I believe you mis-interprede my problem. There is this field that is known as drawing number (eg. of a drawing number format: Q03E12-3-4). I have a list of it. i am intending to count the number of records under the "DrawingNumber" field. There is 2 problems that i face.

Firstly, the result screen is a subform and according to the form, you can see that i have place a textbox at the main form which i intend to count and output the number of records in the textbox (i will attached the current program in my next post). However, i do not know how to refer ? As mentioned before, if there is no sub-form involved, i can easily count by applyin this code at the control source of the textbox ("=Count([DrawingNumber])" ) but for now, i am not able to as there is a sub-form involved.

secondly, in this field, some drawing numbers are duplicated, in a way, same drawing number but different details for other fields. What i want is to count the records of only the unique drawing numbers.

Are you able to get the picture?

PS: i have attached a copy of my initial form that i have created which does not involved any sub-form. Look at the bottom right corner. it may give you a better picture of my idea.
 

Attachments

this is the copy of my current form as mentioned in my last post reply,.
 

Attachments

Users who are viewing this thread

Back
Top Bottom