add a roww to a listbox

gdanalakshmi

Registered User.
Local time
Today, 22:08
Joined
Nov 26, 2002
Messages
102
How to i add a row to a listbox using VBA??

AddItem property is not avaible as the listbox property??


How do i do that??
 
gdanalakshmi,

If the RowSource of the ListBox is a table or query, I would
add the new element to the appropriate table and ReQuery
the ListBox.

If they are "hard-coded" values you can:

Me.ListBox.RowSource = Me.ListBox.RowSource & ";New Value"

hth,
Wayne
 
I alreay have a result of a crosstab query. Then from the output of the crosstab, I have to subtract 2 of the dynamically generated column values and then display in the listbox.
So, i want to scan the query output add to the listbox.

How do i do that??
 
Can you get your values by running a query off of the Crosstab query (is the # of columns returned from your Crosstab always going to be the same)? If so, you should be able to just base your listbox on the derivative (secondary) query.

If not, you may want to look into populating your listbox programmatically using a function. Check the Access help files for a couple of examples of this.

HTH,
John
 

Users who are viewing this thread

Back
Top Bottom