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 » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

dsum problem



 
 
Thread Tools Display Modes
  #1  
Old May 20th, 2010, 02:54 PM posted to microsoft.public.access
Alan
external usenet poster
 
Posts: 459
Default dsum problem

Can someone tell me what wrong with my dsem as the cbmonth is not working

=DSum("[AmountActual]","Sales Analysis","[Posting Date Period] = '" &
[cbmonth] & "'" And "Revenue stream divsion = 'Production'" And "Type =
'Actual'")
  #2  
Old May 20th, 2010, 02:59 PM posted to microsoft.public.access
Daryl S[_2_]
external usenet poster
 
Posts: 881
Default dsum problem

Alan -

Any field names, table names, etc. with spaces or special characters need to
be surrounded by square brackets:

Also, what is [cbmonth]? Is it a control on a form? If so, it should be
either Me.[cbmonth] (if the code is on the form), or
Forms![YourFormName]![cbmonth] (if referred to outside the form).

=DSum("[AmountActual]","[Sales Analysis]","[Posting Date Period] = '" &
[cbmonth] & "'" And "[Revenue stream divsion] = 'Production'" And "[Type] =
'Actual'")

If you still have issues, tell us what [cbmonth] is so we can help with the
syntax...

--
Daryl S


"Alan" wrote:

Can someone tell me what wrong with my dsem as the cbmonth is not working

=DSum("[AmountActual]","Sales Analysis","[Posting Date Period] = '" &
[cbmonth] & "'" And "Revenue stream divsion = 'Production'" And "Type =
'Actual'")

  #3  
Old May 20th, 2010, 03:01 PM posted to microsoft.public.access
Douglas J. Steele[_3_]
external usenet poster
 
Posts: 3,143
Default dsum problem

Already answered in another newsgroup to which you posted the same question.

--
Doug Steele, Microsoft Access MVP
http://www.AccessMVP.com/DJSteele
(no e-mails, please!)

"Alan" wrote in message
...
Can someone tell me what wrong with my dsem as the cbmonth is not working

=DSum("[AmountActual]","Sales Analysis","[Posting Date Period] = '" &
[cbmonth] & "'" And "Revenue stream divsion = 'Production'" And "Type =
'Actual'")



  #4  
Old May 20th, 2010, 03:29 PM posted to microsoft.public.access
Alan
external usenet poster
 
Posts: 459
Default dsum problem

cbmonth is a combo box with is bound to table sales analysis "posting Date
Period", the format is 2010/07 not sure if its text or date??

i put in the ME. function and i get #?Name error, if i leave it out i get a
value but wrong total

"Daryl S" wrote:

Alan -

Any field names, table names, etc. with spaces or special characters need to
be surrounded by square brackets:

Also, what is [cbmonth]? Is it a control on a form? If so, it should be
either Me.[cbmonth] (if the code is on the form), or
Forms![YourFormName]![cbmonth] (if referred to outside the form).

=DSum("[AmountActual]","[Sales Analysis]","[Posting Date Period] = '" &
[cbmonth] & "'" And "[Revenue stream divsion] = 'Production'" And "[Type] =
'Actual'")

If you still have issues, tell us what [cbmonth] is so we can help with the
syntax...

--
Daryl S


"Alan" wrote:

Can someone tell me what wrong with my dsem as the cbmonth is not working

=DSum("[AmountActual]","Sales Analysis","[Posting Date Period] = '" &
[cbmonth] & "'" And "Revenue stream divsion = 'Production'" And "Type =
'Actual'")

  #5  
Old May 20th, 2010, 03:41 PM posted to microsoft.public.access
Alan
external usenet poster
 
Posts: 459
Default dsum problem

Well its not working this time around that why i'm asking to why

"Douglas J. Steele" wrote:

Already answered in another newsgroup to which you posted the same question.

--
Doug Steele, Microsoft Access MVP
http://www.AccessMVP.com/DJSteele
(no e-mails, please!)

"Alan" wrote in message
...
Can someone tell me what wrong with my dsem as the cbmonth is not working

=DSum("[AmountActual]","Sales Analysis","[Posting Date Period] = '" &
[cbmonth] & "'" And "Revenue stream divsion = 'Production'" And "Type =
'Actual'")



.

  #6  
Old May 20th, 2010, 04:04 PM posted to microsoft.public.access
Alan
external usenet poster
 
Posts: 459
Default dsum problem

Hi

=DSum("[AmountActual]","[Sales Analysis]","[Posting Date Period] = '" &
[cbMonth] & "'" And "[Revenue Stream Division] = 'Production'")

The posting date period is correct but soon as i add in

"[Revenue Stream Division] = 'Production'")

it just give the a value not specific to that posting period date

thanks in advance

"Alan" wrote:

Can someone tell me what wrong with my dsem as the cbmonth is not working

=DSum("[AmountActual]","Sales Analysis","[Posting Date Period] = '" &
[cbmonth] & "'" And "Revenue stream divsion = 'Production'" And "Type =
'Actual'")

  #7  
Old May 20th, 2010, 04:14 PM posted to microsoft.public.access
Douglas J. Steele[_3_]
external usenet poster
 
Posts: 3,143
Default dsum problem

You still haven't corrected the quotes. And must be inside the quotes, not
outside them.

=DSum("[AmountActual]","[Sales Analysis]","[Posting Date Period] = '" &
[cbMonth] & "' And [Revenue Stream Division] = 'Production'")

--
Doug Steele, Microsoft Access MVP
http://www.AccessMVP.com/DJSteele
(no e-mails, please!)

"Alan" wrote in message
...
Hi

=DSum("[AmountActual]","[Sales Analysis]","[Posting Date Period] = '" &
[cbMonth] & "'" And "[Revenue Stream Division] = 'Production'")

The posting date period is correct but soon as i add in

"[Revenue Stream Division] = 'Production'")

it just give the a value not specific to that posting period date

thanks in advance

"Alan" wrote:

Can someone tell me what wrong with my dsem as the cbmonth is not working

=DSum("[AmountActual]","Sales Analysis","[Posting Date Period] = '" &
[cbmonth] & "'" And "Revenue stream divsion = 'Production'" And "Type =
'Actual'")



  #8  
Old May 20th, 2010, 04:32 PM posted to microsoft.public.access
RonaldoOneNil
external usenet poster
 
Posts: 345
Default dsum problem

You extra double quotes where you don't need them

..... [cbMonth] & "' And [Revenue Stream Division] = 'Production'")

"Alan" wrote:

Hi

=DSum("[AmountActual]","[Sales Analysis]","[Posting Date Period] = '" &
[cbMonth] & "'" And "[Revenue Stream Division] = 'Production'")

The posting date period is correct but soon as i add in

"[Revenue Stream Division] = 'Production'")

it just give the a value not specific to that posting period date

thanks in advance

"Alan" wrote:

Can someone tell me what wrong with my dsem as the cbmonth is not working

=DSum("[AmountActual]","Sales Analysis","[Posting Date Period] = '" &
[cbmonth] & "'" And "Revenue stream divsion = 'Production'" And "Type =
'Actual'")

  #9  
Old May 20th, 2010, 05:29 PM posted to microsoft.public.access
Daryl S[_2_]
external usenet poster
 
Posts: 881
Default dsum problem

Alan -

To reference the selected value in a combo-box, include the column you need
(column 0 is the first column, etc.). Since you have single quotes around
it, I assume this value is text (use your form name).

Forms![YourFormName]![cbmonth].Column(0)


--
Daryl S


"Alan" wrote:

cbmonth is a combo box with is bound to table sales analysis "posting Date
Period", the format is 2010/07 not sure if its text or date??

i put in the ME. function and i get #?Name error, if i leave it out i get a
value but wrong total

"Daryl S" wrote:

Alan -

Any field names, table names, etc. with spaces or special characters need to
be surrounded by square brackets:

Also, what is [cbmonth]? Is it a control on a form? If so, it should be
either Me.[cbmonth] (if the code is on the form), or
Forms![YourFormName]![cbmonth] (if referred to outside the form).

=DSum("[AmountActual]","[Sales Analysis]","[Posting Date Period] = '" &
[cbmonth] & "'" And "[Revenue stream divsion] = 'Production'" And "[Type] =
'Actual'")

If you still have issues, tell us what [cbmonth] is so we can help with the
syntax...

--
Daryl S


"Alan" wrote:

Can someone tell me what wrong with my dsem as the cbmonth is not working

=DSum("[AmountActual]","Sales Analysis","[Posting Date Period] = '" &
[cbmonth] & "'" And "Revenue stream divsion = 'Production'" And "Type =
'Actual'")

  #10  
Old May 21st, 2010, 11:39 AM posted to microsoft.public.access
Alan
external usenet poster
 
Posts: 459
Default dsum problem


And [Revenue Stream Division] = 'Production'")

thank very much just one last thing

how do i get the code at top to look at "production" and "other"

"Douglas J. Steele" wrote:

You still haven't corrected the quotes. And must be inside the quotes, not
outside them.

=DSum("[AmountActual]","[Sales Analysis]","[Posting Date Period] = '" &
[cbMonth] & "' And [Revenue Stream Division] = 'Production'")

--
Doug Steele, Microsoft Access MVP
http://www.AccessMVP.com/DJSteele
(no e-mails, please!)

"Alan" wrote in message
...
Hi

=DSum("[AmountActual]","[Sales Analysis]","[Posting Date Period] = '" &
[cbMonth] & "'" And "[Revenue Stream Division] = 'Production'")

The posting date period is correct but soon as i add in

"[Revenue Stream Division] = 'Production'")

it just give the a value not specific to that posting period date

thanks in advance

"Alan" wrote:

Can someone tell me what wrong with my dsem as the cbmonth is not working

=DSum("[AmountActual]","Sales Analysis","[Posting Date Period] = '" &
[cbmonth] & "'" And "Revenue stream divsion = 'Production'" And "Type =
'Actual'")



.

 




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 06:52 PM.


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