Hi,
Actually I just want to programmatically set the
controlsource of a text box based on other text boxes on
the form or subform.
It is not difficult to set the controlsource to something
like "=[TextBox1]", but when I tried to
set it to something like "=[TextBox1] & "-->" & [TextBox2]"
I start to have problem. The I found that you can not
have "" within "" directly, so I tried to use constant
such as cQUOTE = """", it is better, but I still can not
input the character &. Then I tried to use chr (38), but
failed too (maybe I did not tried too many times).
Now my workaround is I stored the possible values for the
controlsource in a table and use an event to look up the
strings from the table based on which area I am in on the
form, then assign the looked up value to the controlsource
of the textbox.
I still really need to know how to programmatically do
this without resorting to such long-haul method I am using.
Thanks!
-----Original Message-----
Thomas, that article won't help for looking up a value in a table from a
form.
DLookup() will retrieve the value for you. Details:
Getting a value from a table
at:
http://users.bigpond.net.au/abrowne1/casu-07.html