Update subform - Recordset error (1 Viewer)

Surka

IT dude
Local time
Today, 11:59
Joined
Aug 5, 2013
Messages
41
Attached you will finde the db.

How it works: You search for a User, and then you search for a Serial (thanks to a danish guy).

Now, what if I want to edit the table? (inside the subform, the results). I added an openRecordSet, and Parameters, but I still get the error saying that Recordset cannot be updated.

Why? I opened and sent parameters but still fails.

Thanks.
 

Attachments

  • database - 2 query 1 subform 2 tables.accdb
    580 KB · Views: 77
Last edited:

Surka

IT dude
Local time
Today, 11:59
Joined
Aug 5, 2013
Messages
41
I found this info:

(...)When Recordsets Are Never Updateable

A recordset is never updateable when:
1 It is based on a Crosstab query.
2 It is based on a Union Query.

(...)

I am using a Union Query, is there a workaround with VBA? Check the code inside the db please
 

JHB

Have been here a while
Local time
Today, 15:59
Joined
Jun 17, 2012
Messages
7,732
Now, what if I want to edit the table? (inside the subform, the results). I added an openRecordSet, and Parameters, but I still get the error saying that Recordset cannot be updated.

Why? I opened and sent parameters but still fails.

Thanks.
You can't update data from a Union query, because MS-Access doesn't know, (and you either), from which table the data comes.
Then you've to run an update query, (with criteria) on all tables included in the union query.
An other way is to include the table name in result from the union query.
 
Last edited:

Users who are viewing this thread

Top Bottom