ms access 2010 update linked table with no primary key

2.7k views Asked by At

My sql 2008 linked query data has no primary key column - because I need to bulk update duplicate rows (that are duplicate in 2 or more columns).

When I link the query (I have it as a sql view for now) - the records load in the form ok.

Is there a way to override the form to alow me to edit the data in the textboxes and then click a button to run the custom code to update the linked database tables?

Hope that makes sense.

thanks,

KS

1

There are 1 answers

0
ChrisPadgham On

You can write custom code to update rows in a linked table, the absence of a primary key should not be a problem as long as you can identify the rows you wish to update.

currentdb.execute "UPDATE LinkedTable SET thisField='Yes' WHERE conditionsThatIdentifyTheRows"