none
Microsoft Access Trouble inputting data into Form RRS feed

  • Question

  • So I am updating a Form that is connected with multiple tables.  When I try and type in the form, it gives me an error that says "This recordset is not updateable."  I do not know how to fix this.  I am trying to enter names into this field.  Please help.  
    Wednesday, June 22, 2016 6:04 PM

Answers

  • Hi. As much as you can, try to base the form to only one table to avoid this sort of problems. If you're updating two tables with a one-to-many relationship at the same time, you can use a form/subform setup. Just my 2 cents...
    Wednesday, June 22, 2016 6:15 PM
  • Where you need to insert data into more than one related table, how you do this in a form depends on whether the table is a referenced table or a referencing table:

    1.  In the case of a referenced table you can in most cases make use of the NotInList event procedure of a combo box bound to the relevant foreign key in the form's underlying table.  Say for instance you want to insert a new customer in an Orders form based on a table which includes a CustomerID foreign key column, the NotInList event procedure of a combo box bound to this column would open a form bound to the Customers table in dialogue mode at an empty new record, passing the new value entered into the combo  box to the customers form as the OpenArgs argument of the OpenForm method.  In the customers form's Open event procedure the value passed to the form would be assigned to the DefaultValue property of the relevant control in the form, e.g. CustomerName.  Other data, e.g. the customer's address etc, would then be inserted into other controls in the form.  On closure of the customers form code execution in the NotInList event procedure of the control in the orders form would continue, and the new customer would appear in the combo box's list.

    You'll find an example of the above and other uses of the NotInList event in NotInList.zip in my public databases folder at:

    https://onedrive.live.com/?cid=44CC60D7FEA42912&id=44CC60D7FEA42912!169

    Note that if you are using an earlier version of Access you might find that the colour of some form objects such as buttons shows incorrectly and you will need to amend the form design accordingly.  

    If you have difficulty opening the link copy its text (NB, not the link location) and paste it into your browser's address bar.

    2.  In the case of a referencing table one or more rows can be entered in a subform in the parent form.  In the case of an orders form, one or more rows can be entered into an OrderDetails table by means of a subform bound to that table.  You'll find an example of this in the Inventory demo file in my same OneDrive folder.

    Ken Sheridan, Stafford, England

    Wednesday, June 22, 2016 10:02 PM

All replies

  • Hi. As much as you can, try to base the form to only one table to avoid this sort of problems. If you're updating two tables with a one-to-many relationship at the same time, you can use a form/subform setup. Just my 2 cents...
    Wednesday, June 22, 2016 6:15 PM
  • Where you need to insert data into more than one related table, how you do this in a form depends on whether the table is a referenced table or a referencing table:

    1.  In the case of a referenced table you can in most cases make use of the NotInList event procedure of a combo box bound to the relevant foreign key in the form's underlying table.  Say for instance you want to insert a new customer in an Orders form based on a table which includes a CustomerID foreign key column, the NotInList event procedure of a combo box bound to this column would open a form bound to the Customers table in dialogue mode at an empty new record, passing the new value entered into the combo  box to the customers form as the OpenArgs argument of the OpenForm method.  In the customers form's Open event procedure the value passed to the form would be assigned to the DefaultValue property of the relevant control in the form, e.g. CustomerName.  Other data, e.g. the customer's address etc, would then be inserted into other controls in the form.  On closure of the customers form code execution in the NotInList event procedure of the control in the orders form would continue, and the new customer would appear in the combo box's list.

    You'll find an example of the above and other uses of the NotInList event in NotInList.zip in my public databases folder at:

    https://onedrive.live.com/?cid=44CC60D7FEA42912&id=44CC60D7FEA42912!169

    Note that if you are using an earlier version of Access you might find that the colour of some form objects such as buttons shows incorrectly and you will need to amend the form design accordingly.  

    If you have difficulty opening the link copy its text (NB, not the link location) and paste it into your browser's address bar.

    2.  In the case of a referencing table one or more rows can be entered in a subform in the parent form.  In the case of an orders form, one or more rows can be entered into an OrderDetails table by means of a subform bound to that table.  You'll find an example of this in the Inventory demo file in my same OneDrive folder.

    Ken Sheridan, Stafford, England

    Wednesday, June 22, 2016 10:02 PM