Forum |  HardWare.fr | News | Articles | PC | S'identifier | S'inscrire | Shop Recherche
1190 connectés 

  FORUM HardWare.fr
  Programmation
  VB/VBA/VBS

  [vba] faire la somme dans un rapport help

 


 Mot :   Pseudo :  
 
Bas de page
Auteur Sujet :

[vba] faire la somme dans un rapport help

n°688604
red factio​n
Posté le 31-03-2004 à 16:08:56  profilanswer
 


bon dans mon rapport jai un champ (fldShort) dont jaimerai faire la somme (il est dans detail)
 
j'ai essaye de mettre le controlsource de ledit dont jaimerai placer le resultat = sum([fldShort]) mais ca ne fonctionne pas
 
ca ne va que si le champ vient de la bd  
or le champ fldShort est caculé a partir de plein dautres champ par avant donc pas possible de faire venir ca de la bd
 
sinon jai aussi vu ca sur le net mais jai pas trop compris (ou alors ce que jai fait ne marche pas)
 
"If you would like to show a total in the footer or each page of a report, you may have a problem. Access does not allow the SUM()  
function in the footer.
 
The way around this is to put a SUM() function in an unbound text box in another part of the report.
Choose Properties and set the visible property of the control to false.
 
In the footer, create another control using the "calculation" text box as the ControlSource."
 
 
 
 

mood
Publicité
Posté le 31-03-2004 à 16:08:56  profilanswer
 

n°688622
red factio​n
Posté le 31-03-2004 à 16:20:48  profilanswer
 

Excessive calculating
 
We have a form in Access 2000 that has a number of mathematical functions on it. It was working fine, but we recently added some new items to the form, and now whenever we open the form it displays #Error? in all the controls with maths functionality. I've checked all the code and can see nothing wrong. I enclose a printout of the mathematical functions, as there are only five on the form, and wonder if you can see what the problem is.
 
I'm glad you didn't have more functions in the code, but it wouldn't matter because I already had a good idea about what the problem is, having seen it before. Your problem is you have one control that gets its result from an expression calculated within another control, and you can't do that for certain functions. Your situation is quite complex because of the way you've structured the data, so I'll use a simple example to explain what's wrong. Let's say you had a control on a form with a ControlSource and ControlName of 'Boxes'. Now lets say you place a text control on your form, with a name of 'Text1 ' and a ControlSource of ' = Sum([Boxes])'. So far all is well but, were you to add a second textbox to the form and set its ControlSource to '= Sum([Text1])', you'd see that your error instantly appears, and that's because you can't use a calculated function (in this case 'SumO') on a calculated expression.
 
  :sweat:


Aller à :
Ajouter une réponse
  FORUM HardWare.fr
  Programmation
  VB/VBA/VBS

  [vba] faire la somme dans un rapport help

 

Sujets relatifs
affichage d'images (c pour une horloge) help pleaseOutil pour valider un XML par rapport à un XML Schéma
Help : VBA : Gestion/Modification d'un Objet OLE Powerpoint dans ExcelHelp : Probleme PHP : tableaux et variables!
avantage de <div> par rapport a <table>help morpion graphique java
[HELP requete SQL] update compliqué...HELP URGENT je c que c pour vs, enervant ms je veux mon .EXE
Access, bete requete svp SQL, help needed :cry:Validation d'un formulaire par un menu déroulant .[Help]
Plus de sujets relatifs à : [vba] faire la somme dans un rapport help


Copyright © 1997-2022 Hardware.fr SARL (Signaler un contenu illicite / Données personnelles) / Groupe LDLC / Shop HFR