[ACCESS] Problème de IF...

SubNoX -  
 SubNoX -
Bonjour,

J'ai un gros problème,

Je fais un IF dans VB access et jusqu'à maintenant il fonctionnait bien, même encore ce matin... et pourtant now il ne fonctionne plus!??!

Pas croyable hein et pourtant... j'ai mis des points d'arrêt dans mon code pour voir si les valeurs étaient fausses rien du tout, et le pire je crois c'est que les valeurs qui sont testé dans le IF devrait aboutir au bon résultat...

Je comprend plus rien! j'espère que vous pourrez m'aider!!!

Voici le IF:

        If reptable.Fields("PPM_ID").Value = Me.PPM_ID Then
            
            reptable.Edit
      
            reptable![PPM_ID] = Me.PPM_ID
            reptable![Monate] = Me("Monate" & strVal)
            reptable![Budget] = Me("Budget" & strVal)
            reptable![Stunden] = Me("Stunden" & strVal)
            reptable![Tage] = Me("Tage" & strVal)
            If strMonatDeb > "01" And strJahrDeb >= "2007" And DatePart("yyyy", Me.Datum_Projektstart) = strJahrDeb Then
                strMon = strMonatDeb
                If Len(strMon) = 1 Then
                    strMon = "0" & strMon
                End If
                reptable(strMon & "_Mon") = Me("Personen" & strVal)
                If strJahrEnd2 > strJahrDeb Then
                    For i = strMon To 12
                        reptable(strMon & "_Mon") = Me("Personen" & strVal)
                        strMon = strMon + 1
                        If Len(strMon) = 1 Then
                            strMon = "0" & strMon
                        End If
                    Next i
                Else
                    strMon2 = strMon
                    For i = strMon2 To strMonatEnd
                        reptable(strMon & "_Mon") = Me("Personen" & strVal)
                        strMon = strMon + 1
                        If Len(strMon) = 1 Then
                            strMon = "0" & strMon
                        End If
                    Next i
                End If
            Else
                strMon = Me("Monate" & strVal)
                If Len(strMon) = 1 Then
                    strMon = "0" & strMon
                End If
                reptable(strMon & "_Mon") = Me("Personen" & strVal)
                'strDiffMon = 13 - strMon
                For i = 1 To strMon
                    reptable(strMon & "_Mon") = Me("Personen" & strVal)
                    strMon = strMon - 1
                    If Len(strMon) = 1 Then
                        strMon = "0" & strMon
                    End If
                Next i
            End If
            
            reptable.Update
        
            reptable.Close
            
            strTemoin = 200
            
            GoTo Fpass2
        
        End If


reptable est un recordset qui traverse le champ PPM_ID et Me.PPM_ID est un control du formulaire...

Pourtant justement quand je met les points d'arrêts en arrivant au IF ils sont égaux et pourtant le IF se termine sans faire les calcul au milieu...

Enfin merci beaucoup d'avance à tous ceux qui pourront m'aider!

1 réponse

SubNoX
 
Euh... ct juste mes deux valeur qui n'était pas du même Type...
une text et l'autre nombre....

Dsl...

Merci quand même!
0