Row number

Phonik

Registered User.
Local time
Today, 11:15
Joined
Sep 22, 2006
Messages
111
Hi

Can anyone please tell me how I look up the row number where the value of one of the columns is equal to something.

e.e


Name

Paul
John
Steve
Matt


I want to find the row of the list box where the name = "Steve"

I need the answer = 3

Please can anyone help...

Thanks
 
look at the properties of the list box

you will (or should) see 2 columns, and column widths will be set as
0;4 say

if so, the number id corresponding to the name is there, but hidden in the first column

list box references are zero based so the number is obtained by

listbox.column(0) - the id number
listbox.column(1) - the name

instead of referring explicitly to
listbox.column(0), you can just say listbox

--------
now if your list box JUST has the name, then really this is designed incorrectly. The list box needs to be multicolumn, with the first column equal to the id

note that the list box only DISPLAYS columns with a width, but the hidden columns are still there - combo boxes work the same way - this is really powerful and very useful
 
If there is an ID number available in the actual table on which the listbox is based, you have a shot. Otherwise, row number means nothing at all. There IS no row number (inherently) in any table that doesn't have a prime key usable to identify a record. This is because a table is (technically) an unordered data set.
 

Users who are viewing this thread

Back
Top Bottom