Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Error Message Populating Control Source in Grid
Message
From
16/02/2015 07:46:18
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
16/02/2015 07:39:10
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 7 SP1
OS:
Windows 7
Network:
Windows 2008 Server
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01615357
Message ID:
01615361
Views:
35
>I am attempting to load my grid by combinging two separate fields in my table (first and last name).
>
>The code is: thisform.mygrid1.controlsource = allt(first_name) + ' ' + alltl(last_name)
>
>I placed the code in the Load event of the form.
>
>When it pulls up, I received the following error message: The data source for this object must be a variable reference (Error 1742)

The ControlSource applies to column objects, not to grids. Grids have a RecordSource that refers to the name of an entire table or view; columns have a ControlSource that refers to a column. A calculated expression should be possible.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform