que hago mal
Publicado por Carmen (25 intervenciones) el 02/11/2007 22:54:53
tengo el siguiente codigo
Private Sub Command9_Click()
' CODIGO CORRECTO
If Text5.Text = contrasenausuario Then
Command10.Visible = True
Command10.Visible = False
GoTo SEGUIR
' CODIGO INCORRECTO
Else
Command10.Visible = True
Command10.Caption = "AUTORIZACION DENEGADA"
MsgBox " "
GoTo FALLO
End If
FALLO:
Unload citasusuario
seleciondecitas.Show
SEGUIR:
If claveusuario = "001" Then
Text1.Text = " "
Text2.Text = " "
Text3.Text = " "
Text4.Text = " "
Text5.Text = " "
Unload citasusuario
citas7.Show
End If
If claveusuario = "002" Then
Text1.Text = " "
Text2.Text = " "
Text3.Text = " "
Text4.Text = " "
Text5.Text = " "
Unload citasusuario
citas2.Show
End If
If claveusuario = "003" Then
Text1.Text = " "
Text2.Text = " "
Text3.Text = " "
Text4.Text = " "
Text5.Text = " "
Unload citasusuario
citas4.Show
End If
If claveusuario = "004" Then
Text1.Text = " "
Text2.Text = " "
Text3.Text = " "
Text4.Text = " "
Text5.Text = " "
Unload citasusuario
citas6.Show
End If
End Sub, cuando el codigo es correcto se va a seguir y funciona bien, pero cuando no es correcto, despues de detectar que es incorrecto, pasa por el campo de fallo, pero no hace caso a las intrucciones de "seleciondecitas.show", y sigue por la parte de seguir, que debo hacer, gracias por vuestra colaboracion
Private Sub Command9_Click()
' CODIGO CORRECTO
If Text5.Text = contrasenausuario Then
Command10.Visible = True
Command10.Visible = False
GoTo SEGUIR
' CODIGO INCORRECTO
Else
Command10.Visible = True
Command10.Caption = "AUTORIZACION DENEGADA"
MsgBox " "
GoTo FALLO
End If
FALLO:
Unload citasusuario
seleciondecitas.Show
SEGUIR:
If claveusuario = "001" Then
Text1.Text = " "
Text2.Text = " "
Text3.Text = " "
Text4.Text = " "
Text5.Text = " "
Unload citasusuario
citas7.Show
End If
If claveusuario = "002" Then
Text1.Text = " "
Text2.Text = " "
Text3.Text = " "
Text4.Text = " "
Text5.Text = " "
Unload citasusuario
citas2.Show
End If
If claveusuario = "003" Then
Text1.Text = " "
Text2.Text = " "
Text3.Text = " "
Text4.Text = " "
Text5.Text = " "
Unload citasusuario
citas4.Show
End If
If claveusuario = "004" Then
Text1.Text = " "
Text2.Text = " "
Text3.Text = " "
Text4.Text = " "
Text5.Text = " "
Unload citasusuario
citas6.Show
End If
End Sub, cuando el codigo es correcto se va a seguir y funciona bien, pero cuando no es correcto, despues de detectar que es incorrecto, pasa por el campo de fallo, pero no hace caso a las intrucciones de "seleciondecitas.show", y sigue por la parte de seguir, que debo hacer, gracias por vuestra colaboracion
Valora esta pregunta


0