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"
 

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

Hide and Seek 2
Changing the Control Source 4
Telephone Format 4
Adding New records in multiple tables 2
Unbound TextBox 14
Populating unbound using current record 10
Reset form recordsource 4
Help with Code 1

Top