I\'m migrating an Access database to SQL Server using the SQL Server Migration Assistant (SSMA). The Access application will continue to be used but with linked tables inst
I solve this problem via writing AfterUpdate form-event like this:
Private Sub Form_BeforeUpdate(Cancel As Integer)
cSQL = "update UnderlinedTable set Field1=" & Me.Controls("Field1") & _
", Field2=" & Me.Controls("Field2") & _ ' and all other fields in your form
" where PrimaryKey=" & Me.Recordset.Fields("PrimaryKeyField")
' here command to SQL server that executes this cSQL string
Me.Requery
Cancel = True 'stop Access updating
end sub
It is possible to be wriiten universal BeforeUpdate form-event function that generates automatically Update statement based on form.recordsource and changed form fields that can be invoked from all AfterUpdate form-events passing form as parameter. I have made this for me.