Twitter iPhone pliant OnePlus 11 PS5 Disney+ Orange Livebox Windows 11

Splittage d'un texte en deux

3 réponses
Avatar
Sunrise
Comment transformer un texte "maison_toto" contenu dans un champ en 2 textes
: "maison" dans le champs A et "toto" dans le champ B

3 réponses

Avatar
ze Titi
Bonjour Sunrise

Dim t() As String
t=Split(taChaîne, "_")
tonTexte1=t(0)
tonTexte2=t(1)

ou deuxième solution:

tonTexte1=Left(taChaîne, InStr(taChaîne,"_")-1)
tonTexte2=Mid(taChaîne, InStr(taChaîne,"_")+1)

Dans ton message
Comment transformer un texte "maison_toto" contenu dans un champ en 2 textes
"maison" dans le champs A et "toto" dans le champ B



--
Cordialement,
Thierry

Tout pour réussir avec Access :
http://www.mpfa.info


Avatar
ze Titi
.../...

En n'oubliant pas, bien évidemment, le complément d'info indispensable
disponible ici:

http://support.microsoft.com/directory/worldwide/fr/newsgroup/regles.htm

Bonjour Sunrise

Dim t() As String
t=Split(taChaîne, "_")
tonTexte1=t(0)
tonTexte2=t(1)

ou deuxième solution:

tonTexte1=Left(taChaîne, InStr(taChaîne,"_")-1)
tonTexte2=Mid(taChaîne, InStr(taChaîne,"_")+1)

Dans ton message du
Comment transformer un texte "maison_toto" contenu dans un champ en 2
textes
"maison" dans le champs A et "toto" dans le champ B




--
Cordialement,
Thierry

Tout pour réussir avec Access :
http://www.mpfa.info



Avatar
Sunrise
Merci
ca marche


Bonjour Sunrise

Dim t() As String
t=Split(taChaîne, "_")
tonTexte1=t(0)
tonTexte2=t(1)

ou deuxième solution:

tonTexte1=Left(taChaîne, InStr(taChaîne,"_")-1)
tonTexte2=Mid(taChaîne, InStr(taChaîne,"_")+1)

Dans ton message
Comment transformer un texte "maison_toto" contenu dans un champ en 2 textes
"maison" dans le champs A et "toto" dans le champ B



--
Cordialement,
Thierry

Tout pour réussir avec Access :
http://www.mpfa.info