Results 1 to 6 of 6

Thread: Form is Showing when it's not Supposed to

Threaded View

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Mar 2016
    Location
    San Diego
    Posts
    16

    Form is Showing when it's not Supposed to

    Hello everyone,

    I am having quite a bit of trouble with a form being called when a condition is met. The problem is that it's showing even when the condition is not met

    Can you please help me with my dilemma? Thanks!

    Code:
    Cmd.CommandText = "SELECT descripcion FROM re_sucursal WHERE estatus = 1 AND re_id_cliente = '" & x & "'"
    Set rs = Cmd.Execute
    
    If rs("descripcion").Value = "prueba" Then
            respuesta = MsgBox("Question?", vbYesNo, "Error")
            
            If respuesta = vbNo Then
                Exit Sub
            ElseIf respuesta = vbYes Then
                Load Form9
                If Combo4.text = "Nombre Cliente" Then
                    Form9.Combo4.text = "Nombre Cliente"
                    Form9.Combo1.text = Combo1.text
                    Form9.Command1.Value = True
                    Form9.Command4.Value = True
                    'Form9.Show
                Else
                    Form9.Combo4.text = "Numero Cliente"
                    Form9.Combo1.text = Combo1.text
                    Form9.Command1.Value = True
                    Form9.Command4.Value = True
                    'Form9.Show
                End If
                
                Form9.Show
            End If
        Else
            Form9.Hide
            Unload Form9
        End If
    Last edited by betogm; Mar 16th, 2016 at 01:11 PM.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width