Updating a recordset
The following are cases of query problems and their corresponding solutions. Query based on a Join of tables with no Relationship.
In a query based on a Join of tables with a one-to-many relationship (1: M), you might not be able to edit the data in one or more fields. Join field from the "one" side Conclusion The causes of non-updateable recordsets are many and varied. Hopefully, this list will help you know the difference.
' DAO can be unhappy if we don't clean up our objects in reverse order of ' dependency.
I sometimes will use Add/Update when I want to do an insert using the Insert Into Table (fields....) Values (.....) command because of all the quote and comma permutations required to write the SQL string that can be parsed by Access....a PITA to write...if the data has single or double quotes it gets to be even more frustrating whileusing a recordset is easy to write and requires little or no debugging. Again, this newsgroup has provided an invaluable service with information coming from real people in an understandable format, not just from a reference book.
Hi Using A2003 on XP I am wondering from the MVP's and others, what is the most efficient way (in terms of time to process) of updating data in a table, using the docmd. eg: (if you need it) 1.-------------------------- mysql = "Update [mytable] SET [Some Field] = [somevalue];" docmd.
Run SQL mysql 2.----------------------- set myrecordset = mydb. Execute db Fail On Error ' Takes a brief time to compile before running.
NET library.) Different versions of Access default to different libraries.
In Access 2003, you can find this information if you type: "When can I update data from a query?
" In Access 2007, type: "edit data in a query" I thought it would be useful to list the information in a place that's a little easier to find.
When Recordsets Are Always Updateable A recordset is always updateable when: Recordsets Are Updateable Under Certain Conditions Some queries, especially those involved in a Join, will not be updateable under some conditions, but will be under others.
In other queries, even if the query itself is updateable, some of the fields will not be.