Set ControlSource

  • Thread starter Thread starter DS
  • Start date Start date
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
 
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"
 
Back
Top