Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Load listbox from database
Message
From
06/10/2003 12:42:50
 
 
To
06/10/2003 12:22:57
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00835427
Message ID:
00835438
Views:
21
This message has been marked as the solution to the initial question of the thread.
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.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform