Me imajino que sabes programar, asi que no tendras problemas en la siguientes instrucciones, mira pues obiamnete tienes que programar las ventanas de; altas, vajar, cambios, y salida, para que este simple pero completo, lo mas difisil seria aser la coneccion: Espero puedas travajar con las siguientes sentencias; son para abrir la vase de datos, pero para ser haker nesesitas estudiar y no que te agan tus tareas, pero si es para echarte la mano en algun problema esta bien;
Private Sub Cmdcrear_Click()
Set tabla = New ADODB.Recordset
Set tabla = conexion.Execute("select * from usuarios where usuario='" & Txtusu.Text & "'", , adCmdText)
If tabla.EOF Then
If (Txtpas.Text = Txtpas2.Text) Then
If Opt1.Value Then
nive = 1
End If
If (Opt2.Value) Then
nive = 2
End If
conexion.Execute "insert into usuarios values('" & Txtusu.Text & "','" & Txtpas.Text & "'," & nive & ")", , adCmdText
MsgBox "SE HA CREADO EL NUEVO USUARIO", vbInformation, "aviso"
Txtpas.Text = ""
Txtpas2.Text = ""
Opt1.Value = False
Opt2.Value = False
Txtusu.Text = ""
Txtusu.SetFocus
Else
MsgBox "VUELVE A CONFIRMAR CONTRASEÑA", vbExclamation, "aviso"
Txtpas2.Text = ""
Txtpas2.SetFocus
End If
Else
MsgBox "NO SE PUEDE CREAR USUARIO, YA EXISTE", vbCritical, "aviso"
Txtusu.Text = ""
Txtusu.SetFocus
End If
End Sub
Private Sub Cmdregresar_Click()
Unload Me
End Sub
Private Sub Form_Activate()
On Error GoTo bandera
'crea la conexion a la base de datos
Set conexion = New ADODB.Connection
conexion.ConnectionString = "provider=microsoft.ACE.OLEDB.12.0;Data source=
![Eek! :eek: :eek:](/foro/bakaritas/impactada.gif)
\Mis Documentos\puebla\Biblioteca.accdb;persist security info=false"
conexion.Open
Exit Sub
bandera:
MsgBox Err.Description, vbCritical, "AVISO"
Unload Me
End Sub
Private Sub Txtpas_KeyPress(KeyAscii As Integer)
KeyAscii = Asc(UCase(Chr(KeyAscii)))
If KeyAscii <> 8 Then
KeyAscii = KeyAscii + 20
End If
End Sub
Private Sub Txtpas2_KeyPress(KeyAscii As Integer)
KeyAscii = Asc(UCase(Chr(KeyAscii)))
If KeyAscii <> 8 Then
KeyAscii = KeyAscii + 20
End If
End Sub
Private Sub Txtusu_KeyPress(KeyAscii As Integer)
KeyAscii = Asc(UCase(Chr(KeyAscii)))
End Sub