Friends,
In a form's VB module I populate a list box on the form's open event, based on the ID sent to it in OpenArgs. At certain points in the code I test to see how many items there are in the box. The LstActivities.ListCount property returns the actual count + 1.
The list box's RowSource query is based on a single table and involves a primary key, so I tried just casting that key to a long integer
SELECT CLng(TblEvents.EventID) AS EventID, TblEvents.EventName, ...
No change.
I also tried changing the query to an aggregate query, which, when I run it in the design grid comes up with the appropriate number of records like the normal query does, except it does not display the asterisk that invites a new record. Still the return is the actual value + 1.
So what gives? How can I get that listcount to reflect the number of records returned by the query?
thanks,
p
In a form's VB module I populate a list box on the form's open event, based on the ID sent to it in OpenArgs. At certain points in the code I test to see how many items there are in the box. The LstActivities.ListCount property returns the actual count + 1.
The list box's RowSource query is based on a single table and involves a primary key, so I tried just casting that key to a long integer
SELECT CLng(TblEvents.EventID) AS EventID, TblEvents.EventName, ...
No change.
I also tried changing the query to an aggregate query, which, when I run it in the design grid comes up with the appropriate number of records like the normal query does, except it does not display the asterisk that invites a new record. Still the return is the actual value + 1.
So what gives? How can I get that listcount to reflect the number of records returned by the query?
thanks,
p