j'ai un petit souci pour imbriquer des conditions avec des boutons option.
il me met comme "erreur else sans if"
pouvez-vous m'aider s'il vous plait ?
il me met comme "erreur else sans if"
pouvez-vous m'aider s'il vous plait ?
VB:
Private Sub CommandButton1_Click()
If Me.Option_sortie = True Then
If Me.Cbx_agent <> "" And Me.Cbx_article <> "" And Me.Cbx_activite <> "" And Me.Txt_nombre <> "" Then
With Me.List_order
.AddItem
.List(memoire, 0) = Me.Cbx_article
.List(memoire, 1) = Me.Txt_nombre
.List(memoire, 2) = Me.Cbx_activite
End With
memoire = memoire + 1
Me.Cbx_article = ""
Me.Txt_nombre = ""
Me.Cbx_activite = ""
Me.Cbx_agent = ""
End If
End If
Else
If Me.Option_entree = True Then
If Me.Txt_facture = "" And Me.Cbx_article = "" And Me.Cbx_activite = "" And Me.Txt_nombre = "" And Me.Cbx_fournisseur And Me.Cbx_order = "" Then
MsgBox ("Information Incomplètes !!")
Else
With Me.List_order
.AddItem
.List(memoire, 0) = Me.Cbx_article
.List(memoire, 1) = Me.Txt_nombre
.List(memoire, 2) = Me.Cbx_activite
End With
memoire = memoire + 1
Me.Cbx_article = ""
Me.Txt_nombre = ""
Me.Cbx_activite = ""
End If
End If
End Sub