Set ControlSource

D

DS

I need to set a control source of an unbound textbox on an unbound form.
I'm first setting the recordsource and then i want to set the unbound
textbox from that recorsource.
I tried this but it neither one works.

Forms!frmOne!TxtBox.ControlSource = tblCustomers.CussID

Forms!frmOne!TxtBox.ControlSource = CussID

Any help appreciated.
Thanks
DS
 
D

Dirk Goldgar

DS said:
I need to set a control source of an unbound textbox on an unbound form.
I'm first setting the recordsource and then i want to set the unbound
textbox from that recorsource.
I tried this but it neither one works.

Forms!frmOne!TxtBox.ControlSource = tblCustomers.CussID

Forms!frmOne!TxtBox.ControlSource = CussID



The ControlSource property is a string, so you have to enclose the value in
quotes:

Forms!frmOne!TxtBox.ControlSource = "CussID"
 
Top