Bonjour,
J'espère que je vais être claire

1) J'ai créer une application qui gère des licences d'un club de sport.(Table joueurs) Base access
2) Je renseigne un formulaire avec les licenciés et là le problème est que pour les champs vides j'ai trouvé qu'une solution(un peut nul, mais bon) je mets par défaut un 1 dans le champ. J'enregistre dans une table archive.
Lorsque je veux visualiser le contenu de la table archive(par l'intermédiaire d'une autre form , la requette trouve un 1. Dans la table joueur le 1 correspond sur tous les champ à un ', et là ça plante pas parce que la requette trouve une valeur.
3) C'est une usine à gaz, comment faire pour gérer les null dans la bdd????

Code: Enregistrement des joueurs
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
 
 Me.txtref.Text = dtt.Rows(rownum).Item("IdJoueur")
        Me.txtnom.Text = dtt.Rows(rownum).Item("Nom")
        Me.txtprenom.Text = dtt.Rows(rownum).Item("Prenom")
        Me.txtlicence.Text = dtt.Rows(rownum).Item("Licence")
Code: composition d'équipe
Code : Sélectionner tout - Visualiser dans une fenêtre à part
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
 
 strIDEnt1 = Mid(Me.ComboEnt1.Text, 1, 5)
        strIDEnt2 = Mid(Me.ComboEnt2.Text, 1, 5)
        strIDSoi = Mid(Me.ComboSoi.Text, 1, 5)
        strIDMed = Mid(Me.ComboMed.Text, 1, 5)
        strIDAdj = Mid(Me.ComboAdj.Text, 1, 5)
        strIDRedac = Mid(Me.ComboRédact.Text, 1, 5)
        strIDFonct = Mid(Me.ComboFonction.Text, 1, 10)
        strIDDéleg = Mid(Me.Comboantidop.Text, 1, 5)
        strIDPréparateur = Mid(Me.ComboPreparateur.Text, 1, 5)
        '''''''''''''''''''''''''''''
        'combox arbitres
        strIDjuge = Mid(Me.Combjuge.Text, 1, 5)
 
        '''''''''''''''
        If strIDEnt1 = "" Then
            strIDEnt1 = "1"
        End If
 
        If strIDEnt2 = "" Then
            strIDEnt2 = "1"
        End If
 
        If strIDSoi = "" Then
            strIDSoi = "1"
        End If
enregistrement des données dans la table archive

Code de visualisation de l'archive
Code : Sélectionner tout - Visualiser dans une fenêtre à part
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
 
  Dim MyConnexion As OleDbConnection = New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data source=" & Application.StartupPath & "\gestionjoueurs.mdb;Jet OLEDB:Database Password=admin;")
        Dim Mycommand As OleDbCommand = MyConnexion.CreateCommand()
        Dim intLong As Integer
        Dim strIdentifiant, strNumFeuille As String
 
        Mycommand.CommandText = "SELECT * from Archive_FeuilleMatch_SeniorRéserve where Id_feuille=" & CInt(strIdFeuille)
        MyConnexion.Open()
 
        Dim myReader As OleDbDataReader = Mycommand.ExecuteReader()
 
        myReader.Read()
 
        For j = 1 To 23
 
            Dim MyConnexion2 As OleDbConnection = New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data source=" & Application.StartupPath & "\gestionjoueurs.mdb;Jet OLEDB:Database Password=admi;")
            Dim Mycommand2 As OleDbCommand = MyConnexion2.CreateCommand()
 
            Mycommand2.CommandText = "SELECT IdJoueur,Nom,Prenom,Licence from T_Joueur where IdJoueur=" & CInt(myReader.GetValue(j))
            MyConnexion2.Open()
 
            Dim myReader2 As OleDbDataReader = Mycommand2.ExecuteReader()
            myReader2.Read()
            Select Case j
                Case 1
 
 
                    TA1.Text = myReader2.GetValue(1)
                    TB1.Text = myReader2.GetValue(2)
                    TC1.Text = myReader2.GetValue(3)
                    If myReader2.GetValue(4) = True Then
                        LO1.Text = "O"
                        O1 = 1
                    End If
                    If myReader2.GetValue(4) = False Then
                        LO1.Text = ""
                        O1 = 0
                    End If
                    If myReader2.GetValue(5) = True Then
                        BJ1.Text = "BJ"
                        BJa1 = 1
                    End If
                    If myReader2.GetValue(5) = False Then
                        BJ1.Text = ""
                        BJa1 = 0
                    End If
                    If myReader2.GetValue(6) = True Then
                        B1.Text = "B"
                        Bl1 = 1
                    End If
                    If myReader2.GetValue(6) = False Then
                        B1.Text = ""
                        Bl1 = 0
                    End If
 
                Case 2
 
 
                    TA2.Text = myReader2.GetValue(1)
                    TB2.Text = myReader2.GetValue(2)
                    TC2.Text = myReader2.GetValue(3)
                    If myReader2.GetValue(4) = True Then
                        LO2.Text = "O"
                        O2 = 1
                    End If
                    If myReader2.GetValue(4) = False Then
                        LO2.Text = ""
                        O2 = 0
                    End If
                    If myReader2.GetValue(5) = True Then
                        BJ2.Text = "BJ"
                        BJa2 = 1
                    End If
                    If myReader2.GetValue(5) = False Then
                        BJ2.Text = ""
                        BJa2 = 0
                    End If
                    If myReader2.GetValue(6) = True Then
                        B2.Text = "B"
                        Bl2 = 1
                    End If
                    If myReader2.GetValue(6) = False Then
                        B2.Text = ""
                        Bl2 = 0
                    End If
                Case 3
Bon est ce claire ???


Merci par avance pour une piste ou un tuto

@+
Philippe