Vba access
mondila
Messages postés
59
Date d'inscription
Statut
Membre
Dernière intervention
-
mondila Messages postés 59 Date d'inscription Statut Membre Dernière intervention -
mondila Messages postés 59 Date d'inscription Statut Membre Dernière intervention -
Bonjour,
j'ai ecrie ce code dans l'access mais il n'execute pas
voila le code:
Private Sub Calcul_Click()
Dim y As Integer
Dim a As Integer
Dim b As Integer
Dim c As Integer
Dim x As Integer
Dim z As Integer
Dim t As Integer
Dim h As Integer
y = Me.Texte14.Value
a = ((y - 18) - 42) - 60
b = (y - 18) - 42
c = y - 18
If a >= 0 Then
x = a * 11.8
Me.Texte41.Value = a
Me.Texte64.Value = 11.8
Me.Texte72.Value = x
z = 60 * 11.75
Me.Texte39.Value = 60
Me.Texte62.Value = 11.75
Me.Texte70.Value = z
t = 42 * 7.91
Me.Texte35.Value = 42
Me.Texte60.Value = 7.91
Me.Texte68.Value = t
h = 18 * 2.54
Me.Texte33.Value = 18
Me.Texte58.Value = 2.54
Me.Texte66.Value = h
End If
Else
If b >= 0 Then
x = b * 11.75
Me.Texte39.Value = b
Me.Texte62.Value = 11.75
Me.Texte70.Value = x
z = 42 * 7.91
Me.Texte35.Value = 42
Me.Texte60.Value = 7.91
Me.Texte68.Value = z
t = 18 * 2.54
Me.Texte33.Value = 18
Me.Texte58.Value = 2.54
Me.Texte66.Value = t
End If
Else
If c >= 0 Then
x = c * 7.91
Me.Texte35.Value = c
Me.Texte60.Value = 7.91
Me.Texte68.Value = x
z = 18 * 2.54
Me.Texte33.Value = 18
Me.Texte58.Value = 2.54
Me.Texte66.Value = z
End If
Else
If y <= 18 Then
x = y * 2.54
Me.Texte33.Value = y
Me.Texte58.Value = 2.54
Me.Texte66.Value = x
End Sub
j'ai ecrie ce code dans l'access mais il n'execute pas
voila le code:
Private Sub Calcul_Click()
Dim y As Integer
Dim a As Integer
Dim b As Integer
Dim c As Integer
Dim x As Integer
Dim z As Integer
Dim t As Integer
Dim h As Integer
y = Me.Texte14.Value
a = ((y - 18) - 42) - 60
b = (y - 18) - 42
c = y - 18
If a >= 0 Then
x = a * 11.8
Me.Texte41.Value = a
Me.Texte64.Value = 11.8
Me.Texte72.Value = x
z = 60 * 11.75
Me.Texte39.Value = 60
Me.Texte62.Value = 11.75
Me.Texte70.Value = z
t = 42 * 7.91
Me.Texte35.Value = 42
Me.Texte60.Value = 7.91
Me.Texte68.Value = t
h = 18 * 2.54
Me.Texte33.Value = 18
Me.Texte58.Value = 2.54
Me.Texte66.Value = h
End If
Else
If b >= 0 Then
x = b * 11.75
Me.Texte39.Value = b
Me.Texte62.Value = 11.75
Me.Texte70.Value = x
z = 42 * 7.91
Me.Texte35.Value = 42
Me.Texte60.Value = 7.91
Me.Texte68.Value = z
t = 18 * 2.54
Me.Texte33.Value = 18
Me.Texte58.Value = 2.54
Me.Texte66.Value = t
End If
Else
If c >= 0 Then
x = c * 7.91
Me.Texte35.Value = c
Me.Texte60.Value = 7.91
Me.Texte68.Value = x
z = 18 * 2.54
Me.Texte33.Value = 18
Me.Texte58.Value = 2.54
Me.Texte66.Value = z
End If
Else
If y <= 18 Then
x = y * 2.54
Me.Texte33.Value = y
Me.Texte58.Value = 2.54
Me.Texte66.Value = x
End Sub
j'ai touve où se trouve le pb,c'est les boucle qu'est fait le bag pb
merci a vous