Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Standard view
Full view
of .
Save to My Library
Look up keyword
Like this
0 of .
Results for:
No results containing your search query
P. 1
Código Programa Alumnos con Base de Datos Access

Código Programa Alumnos con Base de Datos Access

Ratings: (0)|Views: 1,091 |Likes:
Published by ricardo037
Código en Visual Basic
Código en Visual Basic

More info:

Categories:Topics, Art & Design
Published by: ricardo037 on Sep 06, 2010
Copyright:Attribution Non-commercial


Read on Scribd mobile: iPhone, iPad and Android.
download as DOC, PDF, TXT or read online from Scribd
See more
See less





Código Programa Alumnos con Base de Datos Access
Private Sub CmdGuardar_Click(Index As Integer)Select Case IndexCase Is = 0rsnotas.Recordset.MoveLast 'Último RegistroCase Is = 1rsnotas.Recordset.MoveFirst ' Primer registroCase Is = 2If Not rsnotas.Recordset.EOF = True Thenrsnotas.Recordset.MoveNext 'Vuelve siguiente registroElseMsgBox "LLEGO AL ÙLTIMO REGISTRO", vbCriticalrsnotas.Recordset.MoveLast 'ULTIMOEnd If Case Is = 3If Not rsnotas.Recordset.BOF = True Thenrsnotas.Recordset.MovePrevious 'UN REGISTRO ATRÁSElseMsgBox " LLEGO AL PRIMER REGISTRO", vbCriticalrsnotas.Recordset.MoveNext 'AVANZA UN REGISTROEnd If Case Is = 4 'Botón Nuevorsnotas.Recordset.AddNew 'deshabilitar los controlesCmdGuardar(0).Enabled = FalseCmdGuardar(1).Enabled = FalseCmdGuardar(2).Enabled = FalseCmdGuardar(3).Enabled = False
CmdGuardar(5).Enabled = FalseCmdGuardar(6).Enabled = FalseCmdGuardar(7).Enabled = FalseText2.SetFocusCase Is = 5Dim MENSAJE As Integer On Error GoTo DeleteErr MENSAJE = MsgBox(" Està seguro de querer borrar el registro?", vbYesNo, "Eliminar el registro")If MENSAJE = vbYes ThenWith rsnotas.Recordset.Delete.MoveNextIf .EOF Then .MoveLastEnd WithEnd If Exit SubDeleteErr:MsgBox Err.DescriptionCase Is = 6rsnotas.Refresh ' para limpiar el control recordsetDim BUSCA As String ' Variable para buscar el nombre o apellidoIf Option1.Value = True Then ' pregunto si esta seleccionada la opción apellidoBUSCA = InputBox("Ingrese EL APELLIDO") ' ventana ingreso apellidorsnotas.Recordset.Find "APELLIDO='" & BUSCA & "'"BUSCA = ""If Text2.Text = "" Then _ MsgBox "No se encontro el registro" ElseIf Option2.Value = True ThenBUSCA = InputBox("Ingrese EL NOMBRE")rsnotas.Recordset.Find "NOMBRE='" & BUSCA & "'" If Text3.Text = "" Then _ MsgBox "No se encontro el registro" End If Case Is = 7End
Case Is = 8CmdGuardar(0).Enabled = True 'habilitar los controlesCmdGuardar(1).Enabled = TrueCmdGuardar(2).Enabled = TrueCmdGuardar(3).Enabled = TrueCmdGuardar(5).Enabled = TrueCmdGuardar(6).Enabled = TrueCmdGuardar(7).Enabled = Truersnotas.Recordset.MovePrevious 'UN REGISTRO ATRÁSEnd SelectEnd SubPrivate Sub CmdGuardar_MouseMove(Index As Integer, Button As Integer, Shift AsInteger, X As Single, Y As Single)Select Case IndexCase Is = 0CmdGuardar(0).Caption = "Último"Case Is = 2CmdGuardar(2).Caption = "Siguiente"End SelectEnd SubPrivate Sub Command1_Click()If Not rsnotas.Recordset.EOF = True ThenAdodc1.Recordset.MoveNextElseMsgBox ("LLEGO AL ÚLTIMO REGISTRO"), vbCriticalrsnotas.Recordset.MoveLastEnd If End SubPrivate Sub Frame2_MouseMove(Button As Integer, Shift As Integer, X As Single, YAs Single)CmdGuardar(0).Caption = ""CmdGuardar(2).Caption = ""End SubPrivate Sub Text1_KeyPress(KeyAscii As Integer)If KeyAscii = 13 ThenText2.SetFocusKeyAscii = 0End If End Sub

Activity (5)

You've already reviewed this. Edit your review.
1 thousand reads
1 hundred reads
rihardmarius liked this

You're Reading a Free Preview

/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->