Private Sub Command3_Click()
On Error GoTo Err_Command3_Click
Dim stDocName As String
Dim stLinkCriteria As String
If Me.List3.ListCount > 0 Then
stDocName = "frmClients"
stLinkCriteria = "[ClientID]=" & Me!
[List3]
DoCmd.OpenForm stDocName, , , stLinkCriteria
DoCmd.Close acForm, "frmSearchClient2", acSaveNo
DoCmd.Close acForm, "frmSearchClient1", acSaveNo
Else
DoCmd.Close acForm, "frmSearchClient2", acSaveNo
DoCmd.Close acForm, "frmSearchClient1", acSaveNo
End If
Exit_Command3_Click:
Exit Sub
Err_Command3_Click:
MsgBox Err.Description
Resume Exit_Command3_Click
End Sub