Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Programmatically setting Controlsource

0 views
Skip to first unread message

Budoi

unread,
Jan 10, 1997, 3:00:00 AM1/10/97
to

I put this in the Init of a form:
Textbox.Controlsource = Client.Lname

But then I get this:
The data source for this object must be a variable reference

If I use the properties sheet to set it to the same field,
it works. So what am I doing wrong?

Eric G. Mercer

unread,
Jan 10, 1997, 3:00:00 AM1/10/97
to

The trick to making this work is to add quotes around the table.fieldname.
( i.e. Textbox.Controlsource = "Client.Lname" ) Without the quotes FoxPro
thinks the field is being set to an expression not a datasource.

egm

Budoi <bu...@i-manila.com.ph> wrote in article
<01bbff05$72872740$810eaccb@otik1>...

James Sharier Jr.

unread,
Jan 10, 1997, 3:00:00 AM1/10/97
to

Budoi <bu...@i-manila.com.ph> wrote in article
<01bbff05$72872740$810eaccb@otik1>...
> I put this in the Init of a form:
> Textbox.Controlsource = Client.Lname
>
> But then I get this:
> The data source for this object must be a variable reference
>
> If I use the properties sheet to set it to the same field,
> it works. So what am I doing wrong?

Try
TextBox.ControlSource = "Client.Lname"

HTH
--
_
-------------------ooO-( )-Ooo---------------------------------
James Sharier Jr. <>< (0 0) (512)602-5193 james....@amd.com
~~~


Lisa Slater Nicholls

unread,
Jan 15, 1997, 3:00:00 AM1/15/97
to

>Try
>TextBox.ControlSource = "Client.Lname"

Hi guys,

And if the above doesn't work (with more complex expressions, try

TextBox.ControlSource = "(Client.Lname)"

<g>.

Best,

>L<


0 new messages