Prev: Is it possible to create a form that resembles a table?
Next: Can you add a tab control inside another tab control
From: BruceM via AccessMonster.com on 26 Mar 2010 07:12 Try removing the square brackets from around Me. If still no success, simplify the expression: =DSum("Amount","Table1") If that works, try adding a single criteria: =DSum("Amount","Table1","[Customer No] = ' " & Me.[cboCustomerNumber] & " ' ") Keep keep building one element at a time until you find what is causing the problem. Alan wrote: >Well this morning i tired a new table completely >had three fields > >Customer No as a text >Posting Date Period as a date/time >Amount as a number > >two combo boxes > >cbocustomerNumber >cboPostingDate >textbox > >Tired this > >=DSum("Amount","Table1","[Customer No] = '" & [Me].[cboCustomerNumber] & "' >And Format([Posting Date >Period],'yyyymm') = '" & Format([Me].[cboPostingDate],"yyyymm") & "'") > >and still got name, now i know that all the field are spelt correcly and in >the right format > > >> > Yer i have tried it with Date/time and put the format to yyyy/mm. >> > >[quoted text clipped - 5 lines] >> calculated textbox doesn't have the same name as any field in your form's >> recordsource. -- Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/Forums.aspx/access-forms/201003/1
From: Alan on 26 Mar 2010 08:05 Customer No Posting Period Date Amount C00001 2009/07 500 C00001 2009/07 500 C00002 2009/07 1000 C00002 2009/07 600 C00001 2009/08 500 C00001 2009/08 500 =DSum("Amount","Table1") That give me the value of 3600 which is correct =DSum("Amount","Table1","[Customer No] = ' " & Me.[cboCustomerNumber] & " ' ") This gives me #Name "BruceM via AccessMonster.com" wrote: > Try removing the square brackets from around Me. > > If still no success, simplify the expression: > > =DSum("Amount","Table1") > > If that works, try adding a single criteria: > > =DSum("Amount","Table1","[Customer No] = ' " & Me.[cboCustomerNumber] & " ' ") > > > Keep keep building one element at a time until you find what is causing the > problem. > > > Alan wrote: > >Well this morning i tired a new table completely > >had three fields > > > >Customer No as a text > >Posting Date Period as a date/time > >Amount as a number > > > >two combo boxes > > > >cbocustomerNumber > >cboPostingDate > >textbox > > > >Tired this > > > >=DSum("Amount","Table1","[Customer No] = '" & [Me].[cboCustomerNumber] & "' > >And Format([Posting Date > >Period],'yyyymm') = '" & Format([Me].[cboPostingDate],"yyyymm") & "'") > > > >and still got name, now i know that all the field are spelt correcly and in > >the right format > > > > > >> > Yer i have tried it with Date/time and put the format to yyyy/mm. > >> > > >[quoted text clipped - 5 lines] > >> calculated textbox doesn't have the same name as any field in your form's > >> recordsource. > > -- > Message posted via AccessMonster.com > http://www.accessmonster.com/Uwe/Forums.aspx/access-forms/201003/1 > > . >
From: RonaldoOneNil on 26 Mar 2010 08:29 Take the spaces out between your single quotes and double quotes and also is the Customer No "C00001" the bound column in your combo box. =DSum("Amount","Table1","[Customer No] = '" & Me.cboCustomerNumber & "'") "Alan" wrote: > > Customer No Posting Period Date Amount > C00001 2009/07 500 > C00001 2009/07 500 > C00002 2009/07 1000 > C00002 2009/07 600 > C00001 2009/08 500 > C00001 2009/08 500 > > =DSum("Amount","Table1") That give me the value of 3600 > which is correct > > =DSum("Amount","Table1","[Customer No] = ' " & Me.[cboCustomerNumber] & " ' ") > > This gives me #Name > > > > > "BruceM via AccessMonster.com" wrote: > > > Try removing the square brackets from around Me. > > > > If still no success, simplify the expression: > > > > =DSum("Amount","Table1") > > > > If that works, try adding a single criteria: > > > > =DSum("Amount","Table1","[Customer No] = ' " & Me.[cboCustomerNumber] & " ' ") > > > > > > Keep keep building one element at a time until you find what is causing the > > problem. > > > > > > Alan wrote: > > >Well this morning i tired a new table completely > > >had three fields > > > > > >Customer No as a text > > >Posting Date Period as a date/time > > >Amount as a number > > > > > >two combo boxes > > > > > >cbocustomerNumber > > >cboPostingDate > > >textbox > > > > > >Tired this > > > > > >=DSum("Amount","Table1","[Customer No] = '" & [Me].[cboCustomerNumber] & "' > > >And Format([Posting Date > > >Period],'yyyymm') = '" & Format([Me].[cboPostingDate],"yyyymm") & "'") > > > > > >and still got name, now i know that all the field are spelt correcly and in > > >the right format > > > > > > > > >> > Yer i have tried it with Date/time and put the format to yyyy/mm. > > >> > > > >[quoted text clipped - 5 lines] > > >> calculated textbox doesn't have the same name as any field in your form's > > >> recordsource. > > > > -- > > Message posted via AccessMonster.com > > http://www.accessmonster.com/Uwe/Forums.aspx/access-forms/201003/1 > > > > . > >
From: Alan on 26 Mar 2010 09:03 WAHOOO we have progress i had to change the bound to bound column 1 ID Customer No Posting Period Date Amount These are my fields for that table i only placed Customer no in the Row source, so why do i select bound column 1 and not 0?? Also now i'm trying to introduce the posting Period Date combo =DSum("Amount","Table1","[CustomerNo] = '" & [cboCustomerNumber] & "'" And Format([Posting Date Period],'yyyymm') = '" & Format([cboPostingDate],"yyyymm") & "'") but i get invalid string syntax ??? "RonaldoOneNil" wrote: > Take the spaces out between your single quotes and double quotes and also is > the Customer No "C00001" the bound column in your combo box. > > =DSum("Amount","Table1","[Customer No] = '" & Me.cboCustomerNumber & "'") > > > "Alan" wrote: > > > > > Customer No Posting Period Date Amount > > C00001 2009/07 500 > > C00001 2009/07 500 > > C00002 2009/07 1000 > > C00002 2009/07 600 > > C00001 2009/08 500 > > C00001 2009/08 500 > > > > =DSum("Amount","Table1") That give me the value of 3600 > > which is correct > > > > =DSum("Amount","Table1","[Customer No] = ' " & Me.[cboCustomerNumber] & " ' ") > > > > This gives me #Name > > > > > > > > > > "BruceM via AccessMonster.com" wrote: > > > > > Try removing the square brackets from around Me. > > > > > > If still no success, simplify the expression: > > > > > > =DSum("Amount","Table1") > > > > > > If that works, try adding a single criteria: > > > > > > =DSum("Amount","Table1","[Customer No] = ' " & Me.[cboCustomerNumber] & " ' ") > > > > > > > > > Keep keep building one element at a time until you find what is causing the > > > problem. > > > > > > > > > Alan wrote: > > > >Well this morning i tired a new table completely > > > >had three fields > > > > > > > >Customer No as a text > > > >Posting Date Period as a date/time > > > >Amount as a number > > > > > > > >two combo boxes > > > > > > > >cbocustomerNumber > > > >cboPostingDate > > > >textbox > > > > > > > >Tired this > > > > > > > >=DSum("Amount","Table1","[Customer No] = '" & [Me].[cboCustomerNumber] & "' > > > >And Format([Posting Date > > > >Period],'yyyymm') = '" & Format([Me].[cboPostingDate],"yyyymm") & "'") > > > > > > > >and still got name, now i know that all the field are spelt correcly and in > > > >the right format > > > > > > > > > > > >> > Yer i have tried it with Date/time and put the format to yyyy/mm. > > > >> > > > > >[quoted text clipped - 5 lines] > > > >> calculated textbox doesn't have the same name as any field in your form's > > > >> recordsource. > > > > > > -- > > > Message posted via AccessMonster.com > > > http://www.accessmonster.com/Uwe/Forums.aspx/access-forms/201003/1 > > > > > > . > > >
From: Alan on 26 Mar 2010 09:04
Correction its bound to column 0 i understand that part, "RonaldoOneNil" wrote: > Take the spaces out between your single quotes and double quotes and also is > the Customer No "C00001" the bound column in your combo box. > > =DSum("Amount","Table1","[Customer No] = '" & Me.cboCustomerNumber & "'") > > > "Alan" wrote: > > > > > Customer No Posting Period Date Amount > > C00001 2009/07 500 > > C00001 2009/07 500 > > C00002 2009/07 1000 > > C00002 2009/07 600 > > C00001 2009/08 500 > > C00001 2009/08 500 > > > > =DSum("Amount","Table1") That give me the value of 3600 > > which is correct > > > > =DSum("Amount","Table1","[Customer No] = ' " & Me.[cboCustomerNumber] & " ' ") > > > > This gives me #Name > > > > > > > > > > "BruceM via AccessMonster.com" wrote: > > > > > Try removing the square brackets from around Me. > > > > > > If still no success, simplify the expression: > > > > > > =DSum("Amount","Table1") > > > > > > If that works, try adding a single criteria: > > > > > > =DSum("Amount","Table1","[Customer No] = ' " & Me.[cboCustomerNumber] & " ' ") > > > > > > > > > Keep keep building one element at a time until you find what is causing the > > > problem. > > > > > > > > > Alan wrote: > > > >Well this morning i tired a new table completely > > > >had three fields > > > > > > > >Customer No as a text > > > >Posting Date Period as a date/time > > > >Amount as a number > > > > > > > >two combo boxes > > > > > > > >cbocustomerNumber > > > >cboPostingDate > > > >textbox > > > > > > > >Tired this > > > > > > > >=DSum("Amount","Table1","[Customer No] = '" & [Me].[cboCustomerNumber] & "' > > > >And Format([Posting Date > > > >Period],'yyyymm') = '" & Format([Me].[cboPostingDate],"yyyymm") & "'") > > > > > > > >and still got name, now i know that all the field are spelt correcly and in > > > >the right format > > > > > > > > > > > >> > Yer i have tried it with Date/time and put the format to yyyy/mm. > > > >> > > > > >[quoted text clipped - 5 lines] > > > >> calculated textbox doesn't have the same name as any field in your form's > > > >> recordsource. > > > > > > -- > > > Message posted via AccessMonster.com > > > http://www.accessmonster.com/Uwe/Forums.aspx/access-forms/201003/1 > > > > > > . > > > |