Prev: Is it possible to create a form that resembles a table?
Next: Can you add a tab control inside another tab control
From: Alan on 25 Mar 2010 12:27 Bruce, The cboCustomerNumber is a Text Field and the Posting Date is also a text field, any suggestions "BruceM via AccessMonster.com" wrote: > Is the bound column of cboCustomerNumber a number field, and are Posting Date > Period and cboPostingDate date fields? > > Alan wrote: > >I have this code in a text box > > > >= dsum("[Amount]", "[July 09 - On Billings and Adjustments Data Query]", > >"[Customer No] = " & [cboCustomerNumber] & " AND Format([Posting Date > >Period], ""yyyymm"") = '" & Format([cboPostingDate], "yyyymm") & "'") > > > >i keep getting #error in my text box > > > >i'm struggling to find they answer to why > > > >the query July 09 - On Billings and Adjustments Data Query > >has fields of > > > >customer Number > >posting periood date > >Amount > > > >Now i have two combo boxes on my form which the text box should look up > > > >Customer number and Name, are bound to another table > > > >No (for customer Number) > >Name ( for customer Name > > > >Customer Listing Table > > > >not linked to July 09 - On Billings and Adjustments Data Query > > > >Is this what causing my error and how do i fix it > > > >Thanks in advanced > > -- > Message posted via http://www.accessmonster.com > > . >
From: BruceM via AccessMonster.com on 25 Mar 2010 14:46 As I wrote in another part of this thread: Posting Date Period should be changed to a Date/Time field. The Format function seems to be able to apply date/time formatting to a text string that "looks" like a date, but if it is a date it should be stored in a date/time field. Be sure the exact field names, not any table field captions you may have used, are included in the DSum expression. Naming problems are typically the source of the #Name error. Also, please post some sample data (from just a few records) of the actual values in Posting Date Period. You have been exchanging some postings with Daryl S. I suggest that you stay in one part of the thread (the Daryl S part would be good), as it is difficult to know what you have tried when you questions are replies are scattered around the thread. Alan wrote: >Bruce, The cboCustomerNumber is a Text Field and the Posting Date is also a >text field, > >any suggestions > >> Is the bound column of cboCustomerNumber a number field, and are Posting Date >> Period and cboPostingDate date fields? >[quoted text clipped - 30 lines] >> > >> >Thanks in advanced -- Message posted via http://www.accessmonster.com
From: Alan on 25 Mar 2010 18:44 Yer i have tried it with Date/time and put the format to yyyy/mm. i'm gonna start again tomorrow morning an see what happens, i know its something i'm doing an it really fustrating lol "BruceM via AccessMonster.com" wrote: > As I wrote in another part of this thread: > > Posting Date Period should be changed to a Date/Time field. The Format > function seems > to be able to apply date/time formatting to a text string that "looks" like a > date, but if it is a date it should be stored in a date/time field. > > Be sure the exact field names, not any table field captions you > may have used, are included in the DSum expression. Naming problems are > typically the > source of the #Name error. > > Also, please post some sample data (from just a few records) of the actual > values in Posting Date Period. > > You have been exchanging some postings with Daryl S. I suggest that you stay > in one part of the thread (the Daryl S part would be good), as it is > difficult to know what you have tried when you questions are replies are > scattered around the thread. > > Alan wrote: > >Bruce, The cboCustomerNumber is a Text Field and the Posting Date is also a > >text field, > > > >any suggestions > > > >> Is the bound column of cboCustomerNumber a number field, and are Posting Date > >> Period and cboPostingDate date fields? > >[quoted text clipped - 30 lines] > >> > > >> >Thanks in advanced > > -- > Message posted via http://www.accessmonster.com > > . >
From: Dirk Goldgar on 25 Mar 2010 18:52 "Alan" <Alan(a)discussions.microsoft.com> wrote in message news:C450E179-F702-43D4-B5C8-6F9D9A940D3B(a)microsoft.com... > Yer i have tried it with Date/time and put the format to yyyy/mm. > > i'm gonna start again tomorrow morning an see what happens, > > i know its something i'm doing an it really fustrating lol If you have verified that the expression should work, make sure that this calculated textbox doesn't have the same name as any field in your form's recordsource. -- Dirk Goldgar, MS Access MVP Access tips: www.datagnostics.com/tips.html (please reply to the newsgroup)
From: Alan on 26 Mar 2010 05:55
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 "Dirk Goldgar" wrote: > "Alan" <Alan(a)discussions.microsoft.com> wrote in message > news:C450E179-F702-43D4-B5C8-6F9D9A940D3B(a)microsoft.com... > > Yer i have tried it with Date/time and put the format to yyyy/mm. > > > > i'm gonna start again tomorrow morning an see what happens, > > > > i know its something i'm doing an it really fustrating lol > > If you have verified that the expression should work, make sure that this > calculated textbox doesn't have the same name as any field in your form's > recordsource. > > -- > Dirk Goldgar, MS Access MVP > Access tips: www.datagnostics.com/tips.html > > (please reply to the newsgroup) > |