Une des deux condition reunie pour executer mon code

Fermé
ERIC - Modifié le 10 déc. 2020 à 12:50
yg_be Messages postés 22720 Date d'inscription lundi 9 juin 2008 Statut Contributeur Dernière intervention 23 avril 2024 - 13 déc. 2020 à 16:00
Bonjour à tous
Svp J'ai un autre code que je veux exécuter si l'une des deux conditions est rempli. J’ai beau essayé mais ça ne va pas.
Voici ce que je souhaite:

1ere condition : if txtpeage= "" and txtration= "" and txtparking="" and txtmontantpayer="" and txtprixcarburant = "" and txtcarburant= "" and txtdestination="" and txtprovenance="" and txtarticle= "" and txttotalvoyage= "" and txtlisteclients="ok")

2eme condition : if TxtTotalvoyage=txtsommeqteprix

Jai besoin de votre aide svp
A voir également:

1 réponse

f894009 Messages postés 17185 Date d'inscription dimanche 25 novembre 2007 Statut Membre Dernière intervention 15 avril 2024 1 701
10 déc. 2020 à 13:30
Bonjour,

Vous faites un ou entre ces deux conditions
0
Je veux exécuter le code à condition qu'une de ces deux conditions soit rempli. Comment écrire le code?
0
f894009 Messages postés 17185 Date d'inscription dimanche 25 novembre 2007 Statut Membre Dernière intervention 15 avril 2024 1 701 > Eric
10 déc. 2020 à 18:02
Re,

Pourtant simple:

if 1ere condition or 2ere condition then

If (txtpeage = "" And txtration = "" And txtparking = "" And txtmontantpayer = "" And _
    txtprixcarburant = "" And txtcarburant = "" And txtdestination = "" And txtprovenance = "" And _
    txtarticle = "" And TxtTotalvoyage = "" And txtlisteclients = "ok") Or TxtTotalvoyage = txtsommeqteprix Then    
0
Eric > f894009 Messages postés 17185 Date d'inscription dimanche 25 novembre 2007 Statut Membre Dernière intervention 15 avril 2024
12 déc. 2020 à 09:06
Bonjour et merci pour cette solution
0
yg_be Messages postés 22720 Date d'inscription lundi 9 juin 2008 Statut Contributeur Dernière intervention 23 avril 2024 1 476 > Eric
13 déc. 2020 à 16:00
peux-tu alors marquer cette discussion comme résolue?
0