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"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Changing the Control Source 4
Telephone Format 4
Reset form recordsource 4
Unbound TextBox 14
Help with Code 1
Set controlsource to fieldname 2
DataSheet Sumary 8
IIF statement question 4

Back
Top