Avatar billede tmsyed Nybegynder
25. maj 2010 - 11:44 Der er 3 kommentarer og
1 løsning

Pls. help ... adding two calculated fields from two subforms within same main form

My problem looks simple but I can't get it done properly.
I have a main form with two subforms, Internal sales & External sales. Both forms have total boxes in the footer, Total internal sales (TIS) & Total external sales (TES). I added a new text box in the footer of second form (External sales) to calculate Total sales (TS), source expression: = [Forms]![Internal sales]!TIS + TES
It does not work in the main form, shows #Name! error. Only works when I have both subforms opened independently.

Solutions found on net but didn't work are:
1. Applying Me.Refresh or ReCalt expression on OnCurrent property of the external sales subform
2. Adding reference to main form in the expression, =[Forms]![Main form]![Internal sales].[Internal sales]!TIS + TES

Help please .....
Avatar billede Slettet bruger
25. maj 2010 - 14:39 #1
= [Forms]![Name of Main form]![Internal sales]!TIS + TES
Avatar billede tmsyed Nybegynder
27. maj 2010 - 11:38 #2
Thanks but this one I already tried and it didn't work
Avatar billede Slettet bruger
27. maj 2010 - 13:55 #3
it works here!~)

...you can send your db to spg.eksperten@gmail.com if you can't get it to work!~)
Avatar billede Slettet bruger
01. juni 2010 - 23:26 #4
hi, I finally had a moment to look at your problem and you need to do like this:

=[Formularer]![010 Budget Input]![012 BI Internal sales1].[Form]![TISBPorkKg]+[TESBPorkKg]

..but you also need to put an afterupdate event on your input fields on 012 BI Internal sales1 (notice the 1, it's not the name of the actual form but the name you gave it as a subform!~)

the afterupdate event should be used to refresh the subform with the total sales!~)
Avatar billede Ny bruger Nybegynder

Din løsning...

Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.

Loading billede Opret Preview
Kategori
Dyk ned i databasernes verden på et af vores praksisnære Access-kurser

Log ind eller opret profil

Hov!

For at kunne deltage på Computerworld Eksperten skal du være logget ind.

Det er heldigvis nemt at oprette en bruger: Det tager to minutter og du kan vælge at bruge enten e-mail, Facebook eller Google som login.

Du kan også logge ind via nedenstående tjenester