Compléments pour Microsoft Access

http://access.fr.free.fr/

Nombre de décimale (Nombre)

Description 

Cette fonction permet de retourner le nombre de décimal d'une donnée.

 
Synthaxe 

Expression_Numérique = NbDecimal(strField)

La synthaxe de la fonction NbDecimal comprend l'élément suivant :

ElémentsDescription

strField

Expression de chaîne correspondant au nom du champ qui contient la valeur à analyser.
 
Exemple 

Aucun exemple disponible pour le moment.

 
Code de la fonction 


Public Function NbDecimal(strField As String) As Long

Dim intCaract As Integer
Dim intStartCaract As Integer

NbDecimal = 0

For intCaract = 1 To Len(strField)
    If Mid(strField, intCaract, 1) = "," Then
        NbDecimal = Len(strField) - intCaract
    End If
Next

End Function