Set rst = New ADODB.Recordset
rst.Open "SELECT * FROM Password WHERE " & _
"Password = 'UserName = [Form2.txtuser'] and ['Password = Form2.txtpass]", conn, adOpenForwardOnly, adLockReadOnly
Do While Not rst.EOF
Shell "C:\Program Files (x86)\Microsoft Office\Office15\MSACCESS.EXE C:\Control Equipo\Menu\ControlEquipos.accdb", vbMaximizedFocus
For Each fld In rst.Fields
MsgBox ("Usuario no Autorizado")
Next
rst.MoveNext
Loop
rst.Open "SELECT * FROM Password WHERE " & _
"Password = 'UserName = [Form2.txtuser'] and ['Password = Form2.txtpass]", conn, adOpenForwardOnly, adLockReadOnly
Do While Not rst.EOF
Shell "C:\Program Files (x86)\Microsoft Office\Office15\MSACCESS.EXE C:\Control Equipo\Menu\ControlEquipos.accdb", vbMaximizedFocus
For Each fld In rst.Fields
MsgBox ("Usuario no Autorizado")
Next
rst.MoveNext
Loop