Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Setting ControlSource propoerty in code 1

Status
Not open for further replies.

barrylowe

Programmer
Nov 6, 2001
188
GB
I am trying to set the controlsource property of one of my text boxes in code when a button is clicked.

I want to set it to the returned value of a rather complex DCount function. However to start off I'm just trying to set it to a text string and I can't even manage that.

I am using the line:

Me.txtFilteredWaitingListTotal.ControlSource = "Test"

This line has been written into the form_load event but when the form opens up the textbox is displaying #Name?

Any help appreciated.
 
try:
Code:
Me.txtFilteredWaitingListTotal.ControlSource = "=""test"""
(The same as typing ="test" into the property.

Greg
"Personally, I am always ready to learn, although I do not always like being taught." - Winston Churchill
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top