If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
#Error Textbox
=DSum("[Value]","Billings Analysis","[CustomerNo] = '" & [cboCustomerNumber] & "' AND [Posting DatePeriod] = '" & [cboPostingDate] & "'") Right i used this code in the source code of my textbox and the textbox keeps flashing, i click on it an it says #ERROR am i moving forward ?? lol |
#2
|
|||
|
|||
#Error Textbox
If Posting DatePeriod is a date field, you need to use # delimiters:
=DSum("[Value]","Billings Analysis","[CustomerNo] = '" & [cboCustomerNumber] & "' AND [Posting DatePeriod] = #" & [cboPostingDate] & "#") In fact, you're best off using =DSum("[Value]","Billings Analysis","[CustomerNo] = '" & [cboCustomerNumber] & "' AND [Posting DatePeriod] = " & Format([cboPostingDate], "\#yyyy\-mm\-dd\#)) -- Doug Steele, Microsoft Access MVP http://www.AccessMVP.com/DJSteele (no e-mails, please!) "Alan" wrote in message ... =DSum("[Value]","Billings Analysis","[CustomerNo] = '" & [cboCustomerNumber] & "' AND [Posting DatePeriod] = '" & [cboPostingDate] & "'") Right i used this code in the source code of my textbox and the textbox keeps flashing, i click on it an it says #ERROR am i moving forward ?? lol |
#3
|
|||
|
|||
#Error Textbox
=DSum("[Value]","Billings Analysis","[CustomerNo] = '" & [cboCustomerNumber] & "' AND [Posting DatePeriod] = " & Format([cboPostingDate], "\#yyyy\-mm\-dd\#)) This gives me a invalid string #error "Douglas J. Steele" wrote: If Posting DatePeriod is a date field, you need to use # delimiters: =DSum("[Value]","Billings Analysis","[CustomerNo] = '" & [cboCustomerNumber] & "' AND [Posting DatePeriod] = #" & [cboPostingDate] & "#") In fact, you're best off using =DSum("[Value]","Billings Analysis","[CustomerNo] = '" & [cboCustomerNumber] & "' AND [Posting DatePeriod] = " & Format([cboPostingDate], "\#yyyy\-mm\-dd\#)) -- Doug Steele, Microsoft Access MVP http://www.AccessMVP.com/DJSteele (no e-mails, please!) "Alan" wrote in message ... =DSum("[Value]","Billings Analysis","[CustomerNo] = '" & [cboCustomerNumber] & "' AND [Posting DatePeriod] = '" & [cboPostingDate] & "'") Right i used this code in the source code of my textbox and the textbox keeps flashing, i click on it an it says #ERROR am i moving forward ?? lol . |
#4
|
|||
|
|||
#Error Textbox
Alan -
Missing a double-quote at the end of the date formatting. Try this: =DSum("[Value]","Billings Analysis","[CustomerNo] = '" & [cboCustomerNumber] & "' AND [Posting DatePeriod] = " & Format([cboPostingDate], "\#yyyy\-mm\-dd\#")) -- Daryl S "Alan" wrote: =DSum("[Value]","Billings Analysis","[CustomerNo] = '" & [cboCustomerNumber] & "' AND [Posting DatePeriod] = " & Format([cboPostingDate], "\#yyyy\-mm\-dd\#)) This gives me a invalid string #error "Douglas J. Steele" wrote: If Posting DatePeriod is a date field, you need to use # delimiters: =DSum("[Value]","Billings Analysis","[CustomerNo] = '" & [cboCustomerNumber] & "' AND [Posting DatePeriod] = #" & [cboPostingDate] & "#") In fact, you're best off using =DSum("[Value]","Billings Analysis","[CustomerNo] = '" & [cboCustomerNumber] & "' AND [Posting DatePeriod] = " & Format([cboPostingDate], "\#yyyy\-mm\-dd\#)) -- Doug Steele, Microsoft Access MVP http://www.AccessMVP.com/DJSteele (no e-mails, please!) "Alan" wrote in message ... =DSum("[Value]","Billings Analysis","[CustomerNo] = '" & [cboCustomerNumber] & "' AND [Posting DatePeriod] = '" & [cboPostingDate] & "'") Right i used this code in the source code of my textbox and the textbox keeps flashing, i click on it an it says #ERROR am i moving forward ?? lol . |
Thread Tools | |
Display Modes | |
|
|