Hola,
Estoy creando un programa tipo cyber el cual el primer formulario tendra para que escriban usuario y contraseña, la base de datos la tendre puesta en un ordenador que hara de servidor.
en este mismo servidor todos podran tener acceso a la base de datos para consulta solo.
en el servidor me hace falta poder añadir usuarios segun la marcha, me baje un codigo para hacerlo por vb6 y office 95 pero con el 2003 tengo problemas
, ademas de no poder añadir usuarios nuevos...
si os sirve de idea el proyecto inicial con ofice 95 es
graciass
Estoy creando un programa tipo cyber el cual el primer formulario tendra para que escriban usuario y contraseña, la base de datos la tendre puesta en un ordenador que hara de servidor.
en este mismo servidor todos podran tener acceso a la base de datos para consulta solo.
en el servidor me hace falta poder añadir usuarios segun la marcha, me baje un codigo para hacerlo por vb6 y office 95 pero con el 2003 tengo problemas
![:( :(](https://forum.elhacker.net/Smileys/navidad/sad.gif)
si os sirve de idea el proyecto inicial con ofice 95 es
Código [Seleccionar]
Private Sub Command1_Click()
On Error Resume Next
Direccion = "y:\cyber.mdb"
Set BaseDatos = OpenDatabase(Direccion)
Set RsUsuarios = BaseDatos.OpenRecordset("Select * From Usuarios")
With RsUsuarios
.FindFirst "Usuario ='" & Text1.Text & "'"
If .NoMatch Then
MsgBox ("Usuario no registrado"), vbInformation
Text1.Text = ""
Text2.Text = ""
Text1.SetFocus
Else
If Text2.Text Like RsUsuarios(2) Then
Usuario = Text1.Text
autentifica.lblusuario.Caption = Text1.Text
'FrmAgenda.CS.Caption = "Cerrar Sesión de " & UCase(Text1.Text)
autentifica.Show
Else
MsgBox ("Password incorrecto"), vbInformation
Text2.Text = ""
Text2.SetFocus
End If
End If
End With
End Sub
Private Sub Command2_Click()
End
End Sub
Private Sub Command3_Click()
Text1.Text = ""
Text2.Text = ""
Text1.SetFocus
End Sub
Private Sub Form_Load()
End Sub
Private Sub text1_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
SendKeys "{tab}"
KeyAscii = 0
End If
End Sub
Private Sub text2_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
SendKeys "{tab}"
KeyAscii = 0
End If
End Sub
graciass