ListIndex...
Hope someone can help.
Using a "customer.dbf", indexed by name, with a listbox on the form, with
the commands:
THISFORM.LIST1.LISTINDEX=20
THISFORM.LIST1.SETFOCUS
It is possible to set the record pointer at the 20th alphabetical record.
My question is, what command returns the "index number" of a record?
Thanks,
Joe
[380 byte] By [
Joe Bertin] at [2007-11-10 12:49:13]

# 1 Re: ListIndex...
There are none. About the only thing you could do is pull the records into
a cursor in the order you want, and use the cursor as the RowSource for your
ListBox.
--
Fred
Microsoft Visual FoxPro MVP
Please respond only to the newsgroups so that all may benefit.
Joe Bertin wrote:
> Hope someone can help.
>
> Using a "customer.dbf", indexed by name, with a listbox on the form,
> with the commands:
>
> THISFORM.LIST1.LISTINDEX=20
> THISFORM.LIST1.SETFOCUS
>
> It is possible to set the record pointer at the 20th alphabetical
> record.
>
> My question is, what command returns the "index number" of a record?
>
> Thanks,
>
> Joe
--
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.474 / Virus Database: 272 - Release Date: 4/18/2003
# 2 Re: ListIndex...
Fred,
Thanks for your response. I'll figure a "work around".
Joe
Fred Taylor <ftaylor@mvps.org> wrote in message
news:3ea4a393@tnews.web.dev-archive.com...
> There are none. About the only thing you could do is pull the records
into
> a cursor in the order you want, and use the cursor as the RowSource for
your
> ListBox.
>
> --
>
> Fred
> Microsoft Visual FoxPro MVP
> Please respond only to the newsgroups so that all may benefit.
>
>
>
>
> Joe Bertin wrote:
> > Hope someone can help.
> >
> > Using a "customer.dbf", indexed by name, with a listbox on the form,
> > with the commands:
> >
> > THISFORM.LIST1.LISTINDEX=20
> > THISFORM.LIST1.SETFOCUS
> >
> > It is possible to set the record pointer at the 20th alphabetical
> > record.
> >
> > My question is, what command returns the "index number" of a record?
> >
> > Thanks,
> >
> > Joe
>
>
> --
> Outgoing mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.474 / Virus Database: 272 - Release Date: 4/18/2003
>
>
# 3 Re: ListIndex...
Hi Jarrett,
Thanks for the help. I'll try it.
Joe
Jarrett <Jcrudisill@Yahoo.com> wrote in message
news:3ea4a74e$1@tnews.web.dev-archive.com...
>
> >It is possible to set the record pointer at the 20th alphabetical record.
>
> If this list is added in alphabetical order
> mylist.selected(20)=.T.
>
> >My question is, what command returns the "index number" of a record?
>
> index = mylist.indexnumber
>
> that will return the index number of the selected entry
> To get the data you have to use the listitem property
# 4 Re: ListIndex...
>It is possible to set the record pointer at the 20th alphabetical record.
If this list is added in alphabetical order
mylist.selected(20)=.T.
>My question is, what command returns the "index number" of a record?
index = mylist.indexnumber
that will return the index number of the selected entry
To get the data you have to use the listitem property