I'm running MS Access 2016 connecting via ODBC to SQLServer 2016. I have a simple form based on a linked table. When I display it in Form View, change some data, and click for next record, it updates the current record and moves to the next, but when I use a combo box to select the record to move to - it displays the record I've selected and if I change some data on it - it returns the error 'ODBC -update on linked table failed; Microsoft ODBC SQL Server Driver Query timeout expired (#0)’
I tried 2 different methods shown below by the code for the 2 different combo boxes
Private Sub cboFindRecord_AfterUpdate()
Dim rst As DAO.Recordset
Set rst = Me.RecordsetClone
rst.FindFirst "Id=" & Nz(Me.cboFindRecord, 0)
If Not rst.EOF Then
Me.Bookmark = rst.Bookmark
End If
rst.Close
Set rst = Nothing
End Sub
Private Sub FindRecord2_AfterUpdate()
Me.txtId.Enabled = True
Me.txtId.Locked = False
Me.txtId.SetFocus
If IsNull(Me.FindRecord2) Then
Exit Sub
End If
DoCmd.FindRecord Me.FindRecord2, acEntire, , acSearchAll, , acCurrent
End Sub
(I have this code on other forms in this database, and they work, but for this form, for this table it doesn’t)
There are 500 records on the table, its seems to be a blocking issue rather than a timeout issue. If I run an Sp_who2 on SQL Server it shows there is a process block – but why, can anyone help me?