A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

#Error Textbox



 
 
Thread Tools Display Modes
  #1  
Old March 26th, 2010, 11:21 AM posted to microsoft.public.access.forms
Alan
external usenet poster
 
Posts: 459
Default #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  
Old March 26th, 2010, 12:44 PM posted to microsoft.public.access.forms
Douglas J. Steele[_3_]
external usenet poster
 
Posts: 3,143
Default #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  
Old March 26th, 2010, 01:36 PM posted to microsoft.public.access.forms
Alan
external usenet poster
 
Posts: 459
Default #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  
Old March 26th, 2010, 02:53 PM posted to microsoft.public.access.forms
Daryl S[_2_]
external usenet poster
 
Posts: 881
Default #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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 01:13 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.