Lo siento pero como has podido apreciar soy un principiante en toda regla. ¿Y ahora qué pasa?
Código:
Private Sub TextDNI_KeyPress(KeyAscii As Integer)
If (KeyAscii = 13) Then
identifica = TextDNI.Text
Set rstUsuarios = db.OpenRecordset("select DNI from Usuarios where DNI='" & identifica & "'")
If Not rstUsuarios.EOF Then
Define(2).Caption = rstUsuarios!nombre + " " + rstUsuarios!apellidos + ". Tel: " + rstUsuarios!telefono
ButConfirm.SetFocus
Else
UsuarioNuevo.Show 1
End If
End If
End Sub