
Error de Compilacion: Etiqueta no definida
Publicado por Leonardo (5 intervenciones) el 14/01/2015 17:32:38
Ante todo muy buenas tardes. Es un placer estar en esta comunidad de programadores. Soy nuevo en la materia y actualmente estoy programando en Visual Basic 6.0
He adelantado un Sistema pero al momento de ejecutar una pantalla (Estudiantes) y hacerle clic en el botón Agregar me da el siguiente error:
El código que estoy realizando es el siguiente:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
Private Sub cmdAgregar_Click()
On Error GoTo Verificar
Conectar
Dim micom As ADODB.Command
Set micom = New ADODB.Command
micom.CommandType = adCmdText
Set RG = New ADODB.Recordset
SQL = "SELECT * FROM TBESTUDIANTES"
RG.Open SQL, cn, adOpenDynamic, adLockOptimistic
VAR1 = Me.txtCI.Text
VAR2 = Me.txtApe.Text
VAR3 = Me.txtNom.Text
VAR4 = Me.txtDir.Text
VAR5 = Me.mskTLF.Text
VAR6 = Me.cldFN.Day
VAR7 = Me.cldFN.Month
VAR8 = Me.cldFN.Year
VAR9 = VAR6 & "/" & VAR7 & "/" & VAR8
RG.MoveFirst
Do While RG.EOF = False
bu = RG!CI
If bu = Me.txtCI.Text Then
MsgBox "ESTE USUARIO YA SE ENCUENTRA REGISTRADO", vbCritical, "Error de Redundancia de datos"
cmdLimpiar_Click
Bloquear_Estu
Exit Sub
End If
RG.MoveNext
If RG.EOF = True Then
micom.CommandText = "Insert into TBESTUDIANTES (CI, APE, NOM, DIR, TLF,FNAC) values ('" & VAR1 & "', '" & VAR2 & "', '" & VAR3 & "', '" & VAR4 & "', '" & VAR5 & "', '" & VAR9 & "')"
micom.ActiveConnection = cn
micom.Execute
Set micom = Nothing
MsgBox "Registros Guardados"
cmdLimpiar_Click
Bloquear_Estu
Me.txtCI.SetFocus
Exit Sub
End If
Loop
RG.Close
Desconectar
Exit Sub
Verificar:
If Error = "El valor de BOF o EOF es True, o el actual registro se eliminó; la operación solicitada requiere un registro actual." Then
GoTo 1
Exit Sub
Else
MsgBox "Imposible realizar accion por favor consulte manual del sistema"
cmdLimpiar_Click
Bloquear_Estu
Exit Sub
End If
End Sub
Estaré muy agradecido si me ayudan.
Saludos!
Valora esta pregunta


0