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





Reply With Quote
