Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Value property of multi-col listbox

Status
Not open for further replies.

StewartUK

Programmer
Feb 19, 2001
860
GB
Hi,

I've found when using a 4 column listbox, that the value property only gives me the value in the first column.

How to I get the value for the whole line?

Thanks

Stewart
 
You can use the BoundColumn property to specify a different single column as the source for Value; to get the values of other columns in the chosen row, you need to look at the contents of that array row or table row. Robert Bradley
Do you have too much money? Visit
 
Hi Stewart,

You can do as FoxDev mentioned and refer to the box's rowsource.

Or you can enumerate the list property:
MyRow=''
With MyForm.MyList
MyIndex=.ListIndex
MyColumns=.ColumnCount
For MyCnt = 1 TO MyColumns
MyRow=MyRow+.List(MyIndex,MyCnt)
EndFor
EndWith

All those My's make me feel like a selfish 3 year old. Jon Hawkins

The World Is Headed For Mutiny,
When All We Want Is Unity. - Creed
 
Robert/Jon,

I realised, after doing some fiddling following your replies, that it was in fact the list property that I was interested in. I was able to do what I wanted by accessing the 4th column in the list array.

I was listing donations received with a view to allowing users to move donations from one record to another. I was including the record number (the 4th column), which I then used to GOto in the donations received table and change the ID field.

Thanks for your help and for advancing my knowledge.

Stewart
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top