fluidmind1984
New member
- Local time
- Today, 16:09
- Joined
- May 17, 2015
- Messages
- 2
Dear all,
I have a strange problem. 10 years ago I wrote the script below and it has always worked perfectly. Now, I have just updated to a new version of MS Access, and I suddenly get the error "Cannot go to the specified record" after going to the first post. Any idea why, and can anyone help with specific code examples (cause I'm a true rookie at this
)?
John
I have a strange problem. 10 years ago I wrote the script below and it has always worked perfectly. Now, I have just updated to a new version of MS Access, and I suddenly get the error "Cannot go to the specified record" after going to the first post. Any idea why, and can anyone help with specific code examples (cause I'm a true rookie at this

John
Private Sub okknap_Click()
On Error GoTo Err_okknap_Click
DoCmd.SetWarnings False
'Gå til første post
DoCmd.GoToRecord , , acFirst
'Set controllerras til controllerrasquery
Dim dbs As DAO.Database
Dim rst As DAO.Recordset
Dim strSQL1 As String
Set dbs = CurrentDb()
strSQL1 = "SELECT * FROM stats"
Set rst = dbs.OpenRecordset(strSQL1, dbOpenSnapshot)
With rst
Do While Not rst.EOF
If spillerID <> "" Then
controllerras = controllerrasquery
DoCmd.GoToRecord , , acNext
End If
.MoveNext
Loop
End With