If it is a bound form(i.e.. recorsource is bound to a table/query) and if
it's a query that the query designed so that it can update the tables then
all you have to do is open the form in design. Double-click the textbox to
open the properties window. Set the Control Source to a field name from the
drop-down box. If the form is unbound you will either need to use code or
run and update query. Hope this helps.
I don't think you can have a bound textbox if it is bound to the table then
just move to a new record
If it is an unbound field that you have populated using DLookup you will
need to use an update query or code
Newbie is correct....using DLookup in the control source of a textbox means
that the textbox is unbound and cannot directly/automatically store its data
in a field in the form's recordsource.
(One should ask -- why would you need to store this value in a table if it's
already available in another table, as evidenced by the ability to use
DLookup to find its value based on something in the currrent form/table?)
Another way to accomplish this storage is to not use DLookup in the
textbox's control source. Instead, bind that textbox to the desired field,
and then use code on the AfterUpdate event of the control that provides the
"criterion" value for DLookup expression and write the value into that
textbox. But again...consider my question in the second paragraph.
(One should ask -- why would you need to store this value in a table if it's
already available in another table, as evidenced by the ability to use
DLookup to find its value based on something in the currrent form/table?)
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.