Assigning control source at run-time..

jbfraleigh

Registered User.
Local time
Today, 21:39
Joined
Aug 8, 2000
Messages
22
In design view, I have my record source set to a query. I use the data from that query as the control source for several text boxes on my form.

At run time, I reset the control source for one of my text boxes (using VBA code) so that the control is unbound. I'd like to be able to reset the control source of the text box back to its original value at a later time.

I'm not quite sure what the syntax is to do this in code.. Any ideas?

Thanks
 
try me![my Field].controlsource = "Field Name"
 
The problem isn't the left hand side, but the right hand side. There doesn't seem to be a way in code to bind data from a query to a text box. I'd expect there would be something like:

Query![Query Name].Field

... but I haven't had any luck finding anything.
 

Users who are viewing this thread

Back
Top Bottom