Hi all,
found a solution for this. I changed the query to have TOP 1 and now I get only the top result from the query. I had to make a second button to open the case as I'm not able to do this in one button.
The next problem I have is that when the form opens, it should fill in the user name in the field [Checker_name], but it does not do it when it opens up. I use the below code:
Code:
Private Sub btn_next_check_Click()
Dim stDocName As String
Dim sSQL4 As String
Dim varUserLock
Dim stLinkCriteria As String
On Error GoTo errr
sSQL4 = "SELECT TOP 1 ID FROM qry_next_case"
Me.frm_Reviews_subform.Form.RecordSource = sSQL4
Me.frm_Reviews_subform.Form.RecordSource = Me.frm_Reviews_subform.Form.RecordSource
Exit Sub
errr:
MsgBox Err.Description
stDocName = "frm_Edit_Reviews"
DoCmd.OpenForm stDocName, , , , , acWindowNormal
Me.[Checker_name].Value = Environ("username")
Me.Refresh
End Sub
Any idea how to solve it?
Greetings.