Bonjour,
Dans un formulaire j'ai 3 TextBox - "Prix", "Qte" et "Total"
Apres introduction du prix et de la quantité, j'ai bien le total mais si par
exemple la Qte est 0,75, 0,50 ou 0,25 je n'ai pas le résultat correct.
Si le prix est 100 et dans la Qte je mets 75% j'ai un total de 100; si la
Qte est 50% ou 25% le Total devient zéro.
J'ai ça:
Private Sub Qte_Change()
Calcul
End Sub
Sub Calcul()
If Me.Prix <> "" And Me.Qte <> "" Then
Me.Total = Format(CDbl(Me.Prix) * CInt(Me.Qte), "0.00 €")
End If
End Sub
Pourriez vous m'aider, s.v.p. ?
Merci d'avance
A. Costa
Sub Calcul() If Me.Prix <> "" And Me.Qte <> "" Then Me.Total = Format(CDbl(Me.Prix) * CInt(Me.Qte), "0.00 â¬") End If End Sub
Pourriez vous m'aider, s.v.p. ? Merci d'avance A. Costa
</pre> </blockquote> </body> </html>
A COSTA
Re-bonjour, Si j'utilise: Me.Total = Format(CDbl(Me.Prix) * fontcolor = "red" <> b > CDbl(Font > Me.Qte), "0.00 €")
le résultat est toujours -1 Merci
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta content="text/html;charset=UTF-8" http-equiv="Content-Type"> <title></title> </head> <body bgcolor="#ffffff" text="#000000"> <pre wrap="">Bonjour A COSTA, dans la ligne : Me.Total = Format(CDbl(Me.Prix) * <font color="red"><b>CInt</b>(</font>Me.Qte), "0.00 €") CInt convertit Me.Qte en integer. Me.Total = Format(CDbl(Me.Prix) * <font color="red"><b>CDbl</b>(</font>Me.Qte), "0.00 €") devrait marcher.
Corto </pre> <br> <blockquote cite="mid:" type="cite"> <pre wrap="">Bonjour, Dans un formulaire j'ai 3 TextBox - "Prix", "Qte" et "Total" Apres introduction du prix et de la quantité, j'ai bien le total mais si par exemple la Qte est 0,75, 0,50 ou 0,25 je n'ai pas le résultat correct. Si le prix est 100 et dans la Qte je mets 75% j'ai un total de 100; si la Qte est 50% ou 25% le Total devient zéro.
J'ai ça:
Private Sub Qte_Change() Calcul End Sub
Sub Calcul() If Me.Prix <> "" And Me.Qte <> "" Then Me.Total = Format(CDbl(Me.Prix) * CInt(Me.Qte), "0.00 €") End If End Sub
Pourriez vous m'aider, s.v.p. ? Merci d'avance A. Costa
</pre> </blockquote> </body> </html>
Re-bonjour,
Si j'utilise:
Me.Total = Format(CDbl(Me.Prix) * fontcolor = "red" <> b > CDbl(Font >
Me.Qte), "0.00 €")
le résultat est toujours -1
Merci
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=UTF-8" http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
<pre wrap="">Bonjour A COSTA,
dans la ligne :
Me.Total = Format(CDbl(Me.Prix) * <font color="red"><b>CInt</b>(</font>Me.Qte), "0.00 €")
CInt convertit Me.Qte en integer.
Me.Total = Format(CDbl(Me.Prix) * <font color="red"><b>CDbl</b>(</font>Me.Qte), "0.00 €")
devrait marcher.
Corto
</pre>
<br>
<blockquote
cite="mid:ED01DA3D-EF1E-4E07-A5C6-427CEBECE86E@microsoft.com"
type="cite">
<pre wrap="">Bonjour,
Dans un formulaire j'ai 3 TextBox - "Prix", "Qte" et "Total"
Apres introduction du prix et de la quantité, j'ai bien le total mais si par
exemple la Qte est 0,75, 0,50 ou 0,25 je n'ai pas le résultat correct.
Si le prix est 100 et dans la Qte je mets 75% j'ai un total de 100; si la
Qte est 50% ou 25% le Total devient zéro.
J'ai ça:
Private Sub Qte_Change()
Calcul
End Sub
Sub Calcul()
If Me.Prix <> "" And Me.Qte <> "" Then
Me.Total = Format(CDbl(Me.Prix) * CInt(Me.Qte), "0.00 €")
End If
End Sub
Pourriez vous m'aider, s.v.p. ?
Merci d'avance
A. Costa
Re-bonjour, Si j'utilise: Me.Total = Format(CDbl(Me.Prix) * fontcolor = "red" <> b > CDbl(Font > Me.Qte), "0.00 €")
le résultat est toujours -1 Merci
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta content="text/html;charset=UTF-8" http-equiv="Content-Type"> <title></title> </head> <body bgcolor="#ffffff" text="#000000"> <pre wrap="">Bonjour A COSTA, dans la ligne : Me.Total = Format(CDbl(Me.Prix) * <font color="red"><b>CInt</b>(</font>Me.Qte), "0.00 €") CInt convertit Me.Qte en integer. Me.Total = Format(CDbl(Me.Prix) * <font color="red"><b>CDbl</b>(</font>Me.Qte), "0.00 €") devrait marcher.
Corto </pre> <br> <blockquote cite="mid:" type="cite"> <pre wrap="">Bonjour, Dans un formulaire j'ai 3 TextBox - "Prix", "Qte" et "Total" Apres introduction du prix et de la quantité, j'ai bien le total mais si par exemple la Qte est 0,75, 0,50 ou 0,25 je n'ai pas le résultat correct. Si le prix est 100 et dans la Qte je mets 75% j'ai un total de 100; si la Qte est 50% ou 25% le Total devient zéro.
J'ai ça:
Private Sub Qte_Change() Calcul End Sub
Sub Calcul() If Me.Prix <> "" And Me.Qte <> "" Then Me.Total = Format(CDbl(Me.Prix) * CInt(Me.Qte), "0.00 €") End If End Sub
Pourriez vous m'aider, s.v.p. ? Merci d'avance A. Costa
Sub Calcul() If Me.Prix <> "" And Me.Qte <> "" Then Me.Total = Format(CDbl(Me.Prix) * CInt(Me.Qte), "0.00 â¬") End If End Sub
Pourriez vous m'aider, s.v.p. ? Merci d'avance A. Costa
</pre> </blockquote> </body> </html>
A COSTA
Merci encore une fois ça marche Bonne journée A. Costa
Bonjour A COSTA,
J'ai testé la macro suivante chez moi et ca marche, quand j'entre 100 dans prix et 0,75 dans qte il m'affiche bien 75,00 € dans total. Private Sub Qte_Change() If Me.Prix <> "" And Me.Qte <> "" Then Me.Total = Format(CDbl(Me.Prix) * CDbl(Me.Qte), "0.00 €") End If End Sub
Corto
Re-bonjour, Si j'utilise: Me.Total = Format(CDbl(Me.Prix) * fontcolor = "red" <> b > CDbl(Font > Me.Qte), "0.00 €")
le résultat est toujours -1 Merci
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta content="text/html;charset=UTF-8" http-equiv="Content-Type"> <title></title> </head> <body bgcolor="#ffffff" text="#000000"> <pre wrap="">Bonjour A COSTA, dans la ligne : Me.Total = Format(CDbl(Me.Prix) * <font color="red"><b>CInt</b>(</font>Me.Qte), "0.00 €") CInt convertit Me.Qte en integer. Me.Total = Format(CDbl(Me.Prix) * <font color="red"><b>CDbl</b>(</font>Me.Qte), "0.00 €") devrait marcher.
Corto </pre> <br> <blockquote cite="mid:" type="cite"> <pre wrap="">Bonjour, Dans un formulaire j'ai 3 TextBox - "Prix", "Qte" et "Total" Apres introduction du prix et de la quantité, j'ai bien le total mais si par exemple la Qte est 0,75, 0,50 ou 0,25 je n'ai pas le résultat correct. Si le prix est 100 et dans la Qte je mets 75% j'ai un total de 100; si la Qte est 50% ou 25% le Total devient zéro.
J'ai ça:
Private Sub Qte_Change() Calcul End Sub
Sub Calcul() If Me.Prix <> "" And Me.Qte <> "" Then Me.Total = Format(CDbl(Me.Prix) * CInt(Me.Qte), "0.00 €") End If End Sub
Pourriez vous m'aider, s.v.p. ? Merci d'avance A. Costa
</pre> </blockquote> </body> </html>
Merci encore une fois
ça marche
Bonne journée
A. Costa
Bonjour A COSTA,
J'ai testé la macro suivante chez moi et ca marche, quand j'entre 100
dans prix et 0,75 dans qte il m'affiche bien 75,00 € dans total.
Private Sub Qte_Change()
If Me.Prix <> "" And Me.Qte <> "" Then
Me.Total = Format(CDbl(Me.Prix) * CDbl(Me.Qte), "0.00 €")
End If
End Sub
Corto
Re-bonjour,
Si j'utilise:
Me.Total = Format(CDbl(Me.Prix) * fontcolor = "red" <> b > CDbl(Font >
Me.Qte), "0.00 €")
le résultat est toujours -1
Merci
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=UTF-8" http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
<pre wrap="">Bonjour A COSTA,
dans la ligne :
Me.Total = Format(CDbl(Me.Prix) * <font color="red"><b>CInt</b>(</font>Me.Qte), "0.00 €")
CInt convertit Me.Qte en integer.
Me.Total = Format(CDbl(Me.Prix) * <font color="red"><b>CDbl</b>(</font>Me.Qte), "0.00 €")
devrait marcher.
Corto
</pre>
<br>
<blockquote
cite="mid:ED01DA3D-EF1E-4E07-A5C6-427CEBECE86E@microsoft.com"
type="cite">
<pre wrap="">Bonjour,
Dans un formulaire j'ai 3 TextBox - "Prix", "Qte" et "Total"
Apres introduction du prix et de la quantité, j'ai bien le total mais si par
exemple la Qte est 0,75, 0,50 ou 0,25 je n'ai pas le résultat correct.
Si le prix est 100 et dans la Qte je mets 75% j'ai un total de 100; si la
Qte est 50% ou 25% le Total devient zéro.
J'ai ça:
Private Sub Qte_Change()
Calcul
End Sub
Sub Calcul()
If Me.Prix <> "" And Me.Qte <> "" Then
Me.Total = Format(CDbl(Me.Prix) * CInt(Me.Qte), "0.00 €")
End If
End Sub
Pourriez vous m'aider, s.v.p. ?
Merci d'avance
A. Costa
Merci encore une fois ça marche Bonne journée A. Costa
Bonjour A COSTA,
J'ai testé la macro suivante chez moi et ca marche, quand j'entre 100 dans prix et 0,75 dans qte il m'affiche bien 75,00 € dans total. Private Sub Qte_Change() If Me.Prix <> "" And Me.Qte <> "" Then Me.Total = Format(CDbl(Me.Prix) * CDbl(Me.Qte), "0.00 €") End If End Sub
Corto
Re-bonjour, Si j'utilise: Me.Total = Format(CDbl(Me.Prix) * fontcolor = "red" <> b > CDbl(Font > Me.Qte), "0.00 €")
le résultat est toujours -1 Merci
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta content="text/html;charset=UTF-8" http-equiv="Content-Type"> <title></title> </head> <body bgcolor="#ffffff" text="#000000"> <pre wrap="">Bonjour A COSTA, dans la ligne : Me.Total = Format(CDbl(Me.Prix) * <font color="red"><b>CInt</b>(</font>Me.Qte), "0.00 €") CInt convertit Me.Qte en integer. Me.Total = Format(CDbl(Me.Prix) * <font color="red"><b>CDbl</b>(</font>Me.Qte), "0.00 €") devrait marcher.
Corto </pre> <br> <blockquote cite="mid:" type="cite"> <pre wrap="">Bonjour, Dans un formulaire j'ai 3 TextBox - "Prix", "Qte" et "Total" Apres introduction du prix et de la quantité, j'ai bien le total mais si par exemple la Qte est 0,75, 0,50 ou 0,25 je n'ai pas le résultat correct. Si le prix est 100 et dans la Qte je mets 75% j'ai un total de 100; si la Qte est 50% ou 25% le Total devient zéro.
J'ai ça:
Private Sub Qte_Change() Calcul End Sub
Sub Calcul() If Me.Prix <> "" And Me.Qte <> "" Then Me.Total = Format(CDbl(Me.Prix) * CInt(Me.Qte), "0.00 €") End If End Sub
Pourriez vous m'aider, s.v.p. ? Merci d'avance A. Costa