[/FONT]
[FONT=Courier New]Option Compare Database
Option Explicit[/FONT]
[FONT=Courier New]Sub Test1_findFirst()
Dim rst As dao.Recordset
Dim MYXID As String[/FONT]
[FONT=Courier New]MYXID = UCase(Trim(Environ("Username")))[/FONT]
[FONT=Courier New]Debug.Print MYXID
Set rst = CurrentDb.OpenRecordset("EMPINFO", dbOpenDynaset)[/FONT]
[FONT=Courier New]rst.MoveFirst
rst.FindFirst rst!IDS = MYXID
If rst.NoMatch Then
Debug.Print "no match"
Else
Debug.Print "Match"
End If
rst.Close
Set rst = Nothing
End Sub