Précédent   Forum des professionnels en informatique > Logiciels > Microsoft Office > Access > Modélisation
Modélisation Le forum qui vous aide à résoudre vos questions relatives à la modélisation (tables et relations) de votre base de données sous Access. Pour les états et les formulaires, postez dans le forum IHM.
Partagez cette discussion sur d'autres réseaux sociaux : Viadeo Twitter Google Facebook Digg Delicious MySpace Yahoo
Réponse Proposer ce sujet en actualité
 
Outils de la discussion
Publicité
'
Vieux 03/11/2011, 19h46   #1
Nouveau Membre du Club
 
Inscription : avril 2009
Messages : 131
Détails du profil
Informations forums :
Inscription : avril 2009
Messages : 131
Points : 38
Points : 38
Par défaut finalise suivie competition

bonjour

voila il y a quelque temps j'ai commence une base access pour suivre les compétition de plusieurs personne.

je réussi a faire pas mal de chose qui me plaise mais je n'arrive pas a finalise cette base de données

mon formulaire de recherche ne fonction pas bien pourquoi?

merci de votre aide
Fichiers attachés
Type de fichier : rar suivie.rar (206,0 Ko, 7 affichages)
titi57 est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 03/11/2011, 19h59   #2
Rédacteur/Modérateur
 
Avatar de Philippe JOCHMANS
 
Homme Philippe JOCHMANS
Développeur informatique
Inscription : mai 2005
Messages : 17 620
Détails du profil
Informations personnelles :
Nom : Homme Philippe JOCHMANS
Âge : 44
Localisation : France, Loir et Cher (Centre)

Informations professionnelles :
Activité : Développeur informatique
Secteur : Communication - Médias

Informations forums :
Inscription : mai 2005
Messages : 17 620
Points : 30 943
Points : 30 943
Envoyer un message via MSN à Philippe JOCHMANS Envoyer un message via Skype™ à Philippe JOCHMANS
Bonjour

Au lieu de mettre une base que beaucoup n'ouvriront pas, il serait bon de détailler ce que tu as fait (code à l'appui) et en expliquant ce qui ne fonctionne pas (un message d'erreur, ce n'est pas le résultat attendu).

Philippe
__________________
Détaillez vos questions, sinon vous aurez des réponses erronées et vous irez tout droit dans le et lisez les règles sinon
Si vous pensez commencer sans un livre, oublier : livres pour débuter
Vous pouvez consulter mes articles sur Access et PowerPoint
Le blog Office.

Inutile de m'envoyer un MP pour des questions techniques ou de me relancer , je n'y répondrais pas.
Philippe JOCHMANS est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 04/11/2011, 19h42   #3
Nouveau Membre du Club
 
Inscription : avril 2009
Messages : 131
Détails du profil
Informations forums :
Inscription : avril 2009
Messages : 131
Points : 38
Points : 38
bonsoir

lors de l'ouverture du formulaire tous s'affiche et je peut consulter les competition sens aucun probleme voir photo

quand je veux faire une recherche sur l"un des criteres rien ne saffiche voir photo

mon code est le suivant:
Code :
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
Option Compare Database
 
Private Sub chktireur_Click()
 
If Me.chktireur Then
    Me.cmbRechtireur.Visible = False
Else
    Me.cmbRechtireur.Visible = True
End If
 
RefreshQuery
 
End Sub
 
Private Sub chkdiscipline_Click()
 
If Me.chkdiscipline Then
    Me.cmbRechdiscipline.Visible = False
Else
    Me.cmbRechdiscipline.Visible = True
End If
 
RefreshQuery
 
End Sub
 
Private Sub chkstand_Click()
 
If Me.chkstand Then
    Me.txtRechstand.Visible = False
Else
    Me.txtRechstand.Visible = True
End If
 
RefreshQuery
 
End Sub
 
Private Sub chkdate_Click()
 
If Me.chkdate Then
    Me.txtRechdate.Visible = False
Else
    Me.txtRechdate.Visible = True
End If
 
RefreshQuery
 
End Sub
Private Sub cmbRechtireur_BeforeUpdate(Cancel As Integer)
 
RefreshQuery
 
End Sub
Private Sub cmbRechdiscipline_BeforeUpdate(Cancel As Integer)
 
RefreshQuery
 
End Sub
 
Private Sub Form_Current()
Me.Caption = "RCHERCHE D'UN MATCH"
End Sub
 
Private Sub Form_Load()
 
Dim ctl As Control
 
For Each ctl In Me.Controls
    Select Case Left(ctl.Name, 3)
        Case "chk"
            ctl.Value = -1
 
        Case "lbl"
            ctl.Caption = "- * - * -"
 
        Case "txt"
            ctl.Visible = False
            ctl.Value = ""
 
        Case "cmb"
            ctl.Visible = False
 
    End Select
Next ctl
 
Me.Liste33.RowSource = "SELECT id_match,id_tireur,nom_tireur,prenom_tireur,nom_discipline,nom_stand,date_match, classement,score_match FROM rmatch;"
 
Me.Liste33.Requery
 
End Sub
 
Private Sub RefreshQuery()
Dim SQL As String
Dim SQLWhere As String
 
SQL = "SELECT id_match,id_tireur,nom_tireur,prenom_tireur,nom_discipline,nom_stand,date_match, classement,score_match FROM rmatch;Where match!id_tireur <> 0 And match!id_tireur like '**'"
 
If Not Me.chktireur Then
    SQL = SQL & "And rmatch!id_tireur like '*" & Me.cmbRechtireur & "*' "
End If
If Not Me.chkdiscipline Then
    SQL = SQL & "And rmatch!nom_discipline = '" & Me.cmbRechdiscipline & "' "
End If
If Not Me.chkstand Then
    SQL = SQL & "And rmatch!nom_stand like '*" & Me.txtRechstand & "*' "
End If
If Not Me.chkdate Then
    SQL = SQL & "And rmatch!date_match like '*" & Me.txtRechdate & "*' "
End If
 
SQLWhere = Trim(Right(SQL, Len(SQL) - InStr(SQL, "Where ") - Len("Where ") + 1))
 
SQL = SQL & ";"
 
Me.lblStats.Caption = DCount("*", "rmatch", SQLWhere) & " / " & DCount("*", "rmatch")
Me.Liste33.RowSource = SQL
Me.Liste33.Requery
 
End Sub
 
 
Private Sub liste33_DblClick(Cancel As Integer)
 
DoCmd.OpenForm "resultat_recherche", acNormal, , "[id_match] = " & Me.Liste33
 
 
End Sub
 
Private Sub txtRechstand_BeforeUpdate(Cancel As Integer)
 
RefreshQuery
 
End Sub
Private Sub txtRechdate_BeforeUpdate(Cancel As Integer)
 
RefreshQuery
 
End Sub
 
Private Sub Fermer_Click()
On Error GoTo Err_Fermer_Click
 
 
    DoCmd.Close
 
Exit_Fermer_Click:
    Exit Sub
 
Err_Fermer_Click:
    MsgBox Err.Description
    Resume Exit_Fermer_Click
 
End Sub
en vous remerciant pour le coup de main

bonne soirée

alex
titi57 est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 08/11/2011, 03h05   #4
Membre actif
 
Avatar de robyseb
 
Homme Sébastien
Développeur indépendant
Inscription : juillet 2011
Messages : 178
Détails du profil
Informations personnelles :
Nom : Homme Sébastien
Localisation : Canada

Informations professionnelles :
Activité : Développeur indépendant

Informations forums :
Inscription : juillet 2011
Messages : 178
Points : 193
Points : 193
Salut voici le code de ton formulaire F_recherche tu a fait des erreurs dans ton SQL ... Sélectionne tous le code de Form_load et refreshquery et colle celuil-ci moi ca fonctionnait...

Code :
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
Private Sub Form_Load()
 
Dim ctl As Control
 
For Each ctl In Me.Controls
    Select Case Left(ctl.Name, 3)
        Case "chk"
            ctl.Value = -1
 
        Case "lbl"
            ctl.Caption = "*/*"
 
        Case "txt"
            ctl.Visible = False
            ctl.Value = ""
 
        Case "cmb"
            ctl.Visible = False
 
    End Select
Next ctl
 
Me.Liste33.RowSource = "SELECT id_match,id_tireur,nom_tireur,prenom_tireur,nom_discipline,nom_stand,date_match, classement,score_match FROM rmatch;"
 
Me.Liste33.Requery
 
End Sub
 
Private Sub RefreshQuery()
Dim SQL As String
Dim SQLWhere As String
 
                   SQL = "SELECT id_match,id_tireur,nom_tireur,prenom_tireur,nom_discipline,nom_stand,date_match, classement,score_match FROM rmatch Where rmatch!id_match <> 0 "
 
    If Not Me.chktireur Then
 
                    SQL = SQL & "And rmatch!id_tireur like '*" & Me.cmbRechtireur & "*' "
            Me.Liste33.RowSource = SQL
        Me.Liste33.Requery
    End If
        If Not Me.chkdiscipline Then
 
                            SQL = SQL & "And rmatch!nom_discipline = '" & Me.cmbRechdiscipline & "' "
                    Me.Liste33.RowSource = SQL
                Me.Liste33.Requery
        End If
                If Not Me.chkstand Then
 
                                    SQL = SQL & "And rmatch!nom_stand like '*" & Me.txtRechstand & "*' "
                        Me.Liste33.RowSource = SQL
                    Me.Liste33.Requery
                End If
                        If Not Me.chkdate Then
 
                                            SQL = SQL & "And rmatch!date_match like '*" & Me.txtRechdate & "*' "
                                    Me.Liste33.RowSource = SQL
                                Me.Liste33.Requery
                        End If
 
SQLWhere = Trim(Right(SQL, Len(SQL) - InStr(SQL, "Where ") - Len("Where ") + 1))
 
SQL = SQL & ";"
 
Me.lblStats.Caption = DCount("*", "rmatch", SQLWhere) & " / " & DCount("*", "rmatch")
 
 
End Sub
__________________
Parfois il faut faire le tour d'une roche 10 fois avant de s'apercevoir quelle est ronde.
  • Si vous trouvé mon post intéressant, n'oubliez pas de voter coté inférieur droit du message. Merci
  • Si votre Post est indiquez le....
robyseb est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 19/11/2011, 22h17   #5
Nouveau Membre du Club
 
Inscription : avril 2009
Messages : 131
Détails du profil
Informations forums :
Inscription : avril 2009
Messages : 131
Points : 38
Points : 38
bonsoir

merci pour la réponse a fonctionne


bon weekend
titi57 est déconnecté   Envoyer un message privé Réponse avec citation 00
Réponse Proposer ce sujet en actualité Cette discussion est résolue.
Outils de la discussion



Fuseau horaire GMT +2. Il est actuellement 05h56.


 
 
 
 
Partenaires

Hébergement Web