Ver Mensaje Individual
  #2 (permalink)  
Antiguo 29/04/2006, 22:00
Avatar de Modern_Crusades
Modern_Crusades
 
Fecha de Ingreso: junio-2005
Mensajes: 620
Antigüedad: 18 años, 10 meses
Puntos: 1
rs.Open "select * from empleado where permisos=1 ", conn, adOpenStatic, adLockOptimistic
rsc.Open "select count(*) as NUMOFRECS from empleado where permisos=1", conn, adOpenStatic, adLockOptimistic
cc = Val(rsc.Fields("NUMOFRECS")) - 1
rsc.Close


rs.MoveFirst
For i = 0 To cc
id = Val(rs.Fields("id"))
pass = rs.Fields("password")
If id = Val(IDA.Text) And pass = UCase(password.Text) Then
' If True Then
exist = True
With PizzaHook.SmartMenuXP1.MenuItems
admin = True
.Enabled(3) = True
.Enabled(5) = True
.Enabled(6) = True
.Enabled(7) = True
.Enabled(8) = True
.Enabled(2) = False
End With
Else
If exist Then
i = Count + 4
End If
rs.MoveNext
End If
Next
If exist Then
Unload Me
Else
Aux.cambiaMsg ("El ID o PASSWORD es Incorrecto")
Dialog1.Caption = "Error"
Call PutWindowOnTop(Dialog1)
Dialog1.Show
End If


esto es l oque yo hice para un sistema si esta el usuario habilito menus sino no espero te sirva