List Box Value from Query

sstreet

Access Demon
Local time
Today, 05:39
Joined
Dec 5, 2002
Messages
50
I have several List Boxes on my Form, which take their value from Count Queries. Each list box shows the number of occurances of a particular name in the main table. The problem comes when I try to add the values together from the list boxes, they are all null although they do show the correct values. Is there a particular reason that this is happening?
 
How are you referencing the fields in the list boxes?
 
The list boxes are set to show the the count value (i.e. 5) from a query:

SELECT Sum(Leave.NoOfDays) AS SumOfNoOfDays, Leave.UserID, Leave.LeaveType
FROM Leave
GROUP BY Leave.UserID, Leave.LeaveType
HAVING (((Leave.UserID)=[Forms]![Main]![cbonames]) AND ((Leave.LeaveType)="PL"));

I don't know how to reference those list boxes, so far I have tried
List71.Value
List71.Column(0)
List71

None of these work
 

Users who are viewing this thread

Back
Top Bottom