
Originally Posted by
AnandKhinvasara
You were wrong in two approaches
1. Trying to edit a textbox that is linked a listbox column,which is based on a query.
2. Thinking that editing the textbox with expression, - will actually change the value in the table.
Please remember
1. query fields can't be edited, and values changed won't reflect in the table.
2. Trying to put a value in a textbox field that is not bound to a field in the table, will not change the value in the original table in any way.
Better approach
->Make a simple form that has fields bound to the table
->Have a command button on your main form that opens up form above with filter applied as below.
DoCmd.OpenForm "tblHRMSEdit", acNormal, , WhereCondition:="ItemNo=" & Me.Text209
->Make changes in the form that opens up. This will actually save the value in the table.
You can refresh the main form contraols after getting focus back, so that it reflects the values you have changed.
This can be on Close Event of tblHRMSEdit form, or on Activate/GotFocus/DatasetChage events of Main Form (you would need to play around a bit).
LEt me know if this helped. Have attached MDB with "Edit Record" button.