Versions des environnements
Network:
Windows 2008 Server
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 reason for the error is that the code is in the wrong place. When the form's Load fires, none of the controls contained in the form have been instantiated yet. If you want to do this in code, the code should go in the Init() of the form after the line DODEFAULT(). At that point, all the controls have been instantiated.
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement