THISFORM.lstCompany.RowSource = "Company.compid"
THISFORM.lstCompany.RowSourceType = 6 && fields
if you've got internet access, I suggest forgoing a manual and using Microsoft's online documentation at
http://msdn.microsoft.com/library/default.asp?url=/nhp/default.asp?contentid=28000961&frame=true>Hello, I am a newbie waiting for a VFP manual to arrive and I'm trying to learn VFP from limited resources at the moment. Can anyone help on how to load a list box with data from a table in a database.
>
>I have a listbox called lstCompany, a database called System, a table in the database called Company and the field I want to extract into the listbox is called compid.
>
>The code I have got so far is :
>
>OPEN DATABASE system
>USE Company.dbf
>THISFORM.lstCompany.RowSource = "Company"
>THISFORM.lstCompany.RowSourceType = 2
>
>I know this is pretty basic stuff but this is as far as I've got. Could anyone give me any pointers please.
>
>Thank-you
Insanity: Doing the same thing over and over and expecting different results.