need some help - record not updateable (1 Viewer)

Jon123

Registered User.
Local time
Today, 08:59
Joined
Aug 29, 2003
Messages
668
I have code behind a cmdbutton simple me.txt1 = "1" which when the button is clicked the txt1 box should get a 1. I get this error Run Time error -2147352567 This Recordset is not updatable. I have checked the form properties and it is set to allow edits. What else could it be?

jon
 

pr2-eugin

Super Moderator
Local time
Today, 13:59
Joined
Nov 30, 2011
Messages
8,494
What is the RecordSource of the Form?
 

CJ_London

Super Moderator
Staff member
Local time
Today, 13:59
Joined
Feb 19, 2013
Messages
16,670
you need to check that your recordset is updateable - it won't be if it is a group by or has complex joins for example.

You may be able to get around complex joins by changing the recordset type from dynaset to dynaset - inconsistent updates in form properties but be aware you may then need to have some code in the form before update event to populate fields that form part of the joins
 

AccessBlaster

Registered User.
Local time
Today, 05:59
Joined
May 22, 2010
Messages
5,999
From: http://www.fmsinc.com/Microsoftaccess/query/non-updateable/index.html

Reasons why a Query or Recordset is not Updateable

There are many reasons why your data may not be updateable. Some are pretty obvious:

The query is a Totals query (uses GROUP BY) or Crosstab query (uses TRANSFORM), so the records aren't individual records
The field is a calculated field, so it can't be edited
You don't have permissions/rights to edit the table or database
The query uses VBA functions or user defined functions and the database isn't enabled (trusted) to allow code to run
Some reasons are less obvious but can't be avoided:

Linked tables without a primary key for certain backend databases (e.g. SQL Server). Access/Jet requires the table to be keyed to make any changes. This makes sense since Access wants to issue a SQL query for modifications but can't uniquely identify the record.
Less obvious are these situations:

Queries with some fields are summaries linked to individual records and the individual records still can't be edited
Queries with multi-table joins that aren't on key fields
Union queries
The most obvious and annoying situations are queries on one table with totals (Group By, Sum, Count, etc.) that aggregate multiple records. You wouldn’t expect to edit that since you are not viewing individual records. However, if any portion of your query contains a summary (GROUP BY) field, all the fields of the returned records are not editable (not just the summary fields). This paper discusses some ways around this limitation.
 

ChrisSedgwick

Registered User.
Local time
Today, 13:59
Joined
Jan 8, 2015
Messages
119
you need to check that your recordset is updateable - it won't be if it is a group by or has complex joins for example.

You may be able to get around complex joins by changing the recordset type from dynaset to dynaset - inconsistent updates in form properties but be aware you may then need to have some code in the form before update event to populate fields that form part of the joins

If you're not too familiar with code, how else would you describe what I need to do. I'm sorry to act so stupid - I just need to understand it...
 

CJ_London

Super Moderator
Staff member
Local time
Today, 13:59
Joined
Feb 19, 2013
Messages
16,670
poster has cross posted from this thread

http://www.access-programmers.co.uk/forums/showthread.php?t=273299

with respect

If you're not too familiar with code, how else would you describe what I need to do
What else can we tell you if you haven't told us anything? You asked to be pointed in the right direction - AccessBlaster has provided a good list of reasons why a recordset is not updateable - better than my brief summary

If you don't understand what he is saying, suggest you post your code, although if it was working before and now isn't and the code has not changed, it implies an issue with the data or changes to the underlying tables and/or relationships.
 

Users who are viewing this thread

Top Bottom