Unanswered: Listbox and Textbox help again needed!
I need some help with a previous question I posted here a short while back. My question was answered very kindly by forum member Savbill who attached the following attachment as an example for what I wanted to do. The example does exactly what I want, apart from one thing which I also need help with...
My original problem was - wanted to select a row from a listbox (e.g. row 3) and enter a text value into a textbox and click a command button. Once the command button is clicked I wanted Column 3 of the listbox (and corresponding field in the corresponding table) to be updated with the value from the textbox.
The example works perfectly apart from one thing..My database has relationships between the table I want to update and other tables. This stops the code from working in MY database, but it works fine in the attached example because it is only one table.
My database has a relationship with the field STATUS CODE (one to many) and the error message says I "cannot add or change a record because a related record is required in table "Code Location" - Status Code is a primary key in Code Location which is a field in "Status Code" table.
Any ideas how I can get the code to work with a related field (status code) in another table?