j'ai fais un bouton de recherche en vb6 et losrque je=20
l'essai pour voir si il fonctionne il ne m'affiche pas=20
ma recherche. vers un fichier s=E9quentiel.
voici le code=20
Private Sub cmdRechercher_Click()
Const conmess As String =3D "Entrez le nom et Pr=E9nom:"
Const contitre As String =3D "Carnet"
Const conMsg As String =3D "Recherche infructueuse."
strrecherche =3D InputBox(conmess, contitre)
intPosTrouve =3D InStr(1, strNom =3D txtNom.Text,=20
strprenom =3D txtPrenom.Text, 1)
If intPosTrouve =3D 0 Then
intValRenvoi =3D MsgBox(conMsg,=20
conBtns, "rechercher")
End If
"ticul" a écrit dans le message de news:671301c3e669$3aad0d00$
j'ai fais un bouton de recherche en vb6 et losrque je l'essai pour voir si il fonctionne il ne m'affiche pas ma recherche. vers un fichier séquentiel.
voici le code
Private Sub cmdRechercher_Click() Const conmess As String = "Entrez le nom et Prénom:" Const contitre As String = "Carnet" Const conMsg As String = "Recherche infructueuse." strrecherche = InputBox(conmess, contitre) intPosTrouve = InStr(1, strNom = txtNom.Text, strprenom = txtPrenom.Text, 1) If intPosTrouve = 0 Then intValRenvoi = MsgBox(conMsg, conBtns, "rechercher") End If
"ticul" <anonymous@discussions.microsoft.com> a écrit dans le message
de news:671301c3e669$3aad0d00$a001280a@phx.gbl
j'ai fais un bouton de recherche en vb6 et losrque je
l'essai pour voir si il fonctionne il ne m'affiche pas
ma recherche. vers un fichier séquentiel.
voici le code
Private Sub cmdRechercher_Click()
Const conmess As String = "Entrez le nom et Prénom:"
Const contitre As String = "Carnet"
Const conMsg As String = "Recherche infructueuse."
strrecherche = InputBox(conmess, contitre)
intPosTrouve = InStr(1, strNom = txtNom.Text,
strprenom = txtPrenom.Text, 1)
If intPosTrouve = 0 Then
intValRenvoi = MsgBox(conMsg,
conBtns, "rechercher")
End If
"ticul" a écrit dans le message de news:671301c3e669$3aad0d00$
j'ai fais un bouton de recherche en vb6 et losrque je l'essai pour voir si il fonctionne il ne m'affiche pas ma recherche. vers un fichier séquentiel.
voici le code
Private Sub cmdRechercher_Click() Const conmess As String = "Entrez le nom et Prénom:" Const contitre As String = "Carnet" Const conMsg As String = "Recherche infructueuse." strrecherche = InputBox(conmess, contitre) intPosTrouve = InStr(1, strNom = txtNom.Text, strprenom = txtPrenom.Text, 1) If intPosTrouve = 0 Then intValRenvoi = MsgBox(conMsg, conBtns, "rechercher") End If
End Sub
Pascal B.
Salut (beau) ticul,
La fonction ne fonctionne pas comme çà ! Voici la syntaxe exacte:
InStr([start, ]string1, string2[, compare])
String2 est le texte à rechercher dans String1
Donc, il faut écrire:
intPosTrouveNom = InStr(1, txtNom.Text, strNom,1) intPosTrouvePrenom = InStr(1, txtPrenom.Text, strPrenom,1) If intPosTrouveNom = 0 And intPosTrouvePrenom = 0 then intValRenvoi = MsgBox(conMsg, conBtns, "rechercher") End If
"ticul" a écrit dans le message de news:671301c3e669$3aad0d00$ j'ai fais un bouton de recherche en vb6 et losrque je l'essai pour voir si il fonctionne il ne m'affiche pas ma recherche. vers un fichier séquentiel.
voici le code
Private Sub cmdRechercher_Click() Const conmess As String = "Entrez le nom et Prénom:" Const contitre As String = "Carnet" Const conMsg As String = "Recherche infructueuse." strrecherche = InputBox(conmess, contitre) intPosTrouve = InStr(1, strNom = txtNom.Text, strprenom = txtPrenom.Text, 1) If intPosTrouve = 0 Then intValRenvoi = MsgBox(conMsg, conBtns, "rechercher") End If
End Sub
.
Salut (beau) ticul,
La fonction ne fonctionne pas comme çà !
Voici la syntaxe exacte:
InStr([start, ]string1, string2[, compare])
String2 est le texte à rechercher dans String1
Donc, il faut écrire:
intPosTrouveNom = InStr(1, txtNom.Text, strNom,1)
intPosTrouvePrenom = InStr(1, txtPrenom.Text, strPrenom,1)
If intPosTrouveNom = 0 And intPosTrouvePrenom = 0 then
intValRenvoi = MsgBox(conMsg, conBtns, "rechercher")
End If
"ticul" <anonymous@discussions.microsoft.com> a écrit dans le message de
news:671301c3e669$3aad0d00$a001280a@phx.gbl...
j'ai fais un bouton de recherche en vb6 et losrque je
l'essai pour voir si il fonctionne il ne m'affiche pas
ma recherche. vers un fichier séquentiel.
voici le code
Private Sub cmdRechercher_Click()
Const conmess As String = "Entrez le nom et Prénom:"
Const contitre As String = "Carnet"
Const conMsg As String = "Recherche infructueuse."
strrecherche = InputBox(conmess, contitre)
intPosTrouve = InStr(1, strNom = txtNom.Text,
strprenom = txtPrenom.Text, 1)
If intPosTrouve = 0 Then
intValRenvoi = MsgBox(conMsg,
conBtns, "rechercher")
End If
La fonction ne fonctionne pas comme çà ! Voici la syntaxe exacte:
InStr([start, ]string1, string2[, compare])
String2 est le texte à rechercher dans String1
Donc, il faut écrire:
intPosTrouveNom = InStr(1, txtNom.Text, strNom,1) intPosTrouvePrenom = InStr(1, txtPrenom.Text, strPrenom,1) If intPosTrouveNom = 0 And intPosTrouvePrenom = 0 then intValRenvoi = MsgBox(conMsg, conBtns, "rechercher") End If
"ticul" a écrit dans le message de news:671301c3e669$3aad0d00$ j'ai fais un bouton de recherche en vb6 et losrque je l'essai pour voir si il fonctionne il ne m'affiche pas ma recherche. vers un fichier séquentiel.
voici le code
Private Sub cmdRechercher_Click() Const conmess As String = "Entrez le nom et Prénom:" Const contitre As String = "Carnet" Const conMsg As String = "Recherche infructueuse." strrecherche = InputBox(conmess, contitre) intPosTrouve = InStr(1, strNom = txtNom.Text, strprenom = txtPrenom.Text, 1) If intPosTrouve = 0 Then intValRenvoi = MsgBox(conMsg, conBtns, "rechercher") End If