Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Test for longest row of text file
Message
 
 
To
24/11/2009 17:17:15
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01435894
Message ID:
01436491
Views:
43
>Got time for a quicky question naomi?
>in the edit box window i have created how would i place a database record in the editbox - complicated?
>or just a simple change in the one line of code
>
>currently the contents is defined by variable mes (message)
>oFrm.edit1.value = filetostr(mes)
>
>i would like it to display (and edit) record number 2 of database 'mydata'
>readonly .f., (the edit i can handle) -
>
>the record i'm clueless - If its too complicated you can take a pass on this one :)
>
>
>thanks
>
>k

You can directly open the table in the Load method of the form with

USE myTable in 0 alias myTable shared

And then set

thisform.myEditBox.ControlSource = 'MyTable.MyMemoField' && You can set it in the Init of the form

--------------------------------------
I usually prefer to either use buffered tables or local views or CursorAdapter. In any case, you just assing ControlSource of the control (in this case EditBox) to a Table.Field. You can do this in the property sheet or in code.
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform