Update fields in filtered view (filter based on two tables)
Posted on 2013-01-21
Using Access 2010, continuous form. This form has read-write access to Table1 but only reads (displays fields) from Table2
I have enabled the user to dynamically filter the form with criteria from both tables. This works fine for a form filter. Everything is great but.....
I have a field in Table1 called [Tag]. I would like the user to create a filtered result of all the records. I've got that part done. Next, I would like to enable the user to click a button and cause all the records in the current view to have the [Tag] field set to "y".
My form filter looks like this. Me.Filter = "[Transaction Type] = 1 and [Shape] = 'Round'"
I tried the following command to update Table1.[Tag]
Currentdb.execute "Update Table1 Set Table1 & [Tag] = 'y' where [Transaction Type] = 1 and [Shape] = 'Round'"
As far as I can tell, this command fails because it refers to a field in Table2.