DSum problem

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

I have the following in a group header section of a report:

=DSum("[authamt]","fy02_basetable","fy02_basetable.[program] =[program1]")

But it is giving me "Error#" instead of a number.

There is a field named [program1] with countrol source being "program" and
of course the DSum field above.

Does anyone know how I can remedy this?

Thanks in advance,
geebee
 
Try this instead:

If the value in the program1 field is numeric:
=DSum("[authamt]","fy02_basetable","[program] = " & Me![program1])

If the value in the program1 field is text:
=DSum("[authamt]","fy02_basetable","[program] = '" & Me![program1] & "'")

For clarity, in the text example, there is a single quote + double quote following the = sign in
the critieria (' ") and a single quote surrounded by double quotes after the name of the field ("
' "). These have been shown here with a space character for clarity, but you should omit the
space character.

Tom
___________________________________


Hi,

I have the following in a group header section of a report:

=DSum("[authamt]","fy02_basetable","fy02_basetable.[program] =[program1]")

But it is giving me "Error#" instead of a number.

There is a field named [program1] with countrol source being "program" and
of course the DSum field above.

Does anyone know how I can remedy this?

Thanks in advance,
geebee
 
I have the following as you suggested as the control source:

=DSum("[authamt]","fy02_basetable","[program] = '"& Me![program1] &"'")

But now when I run the report, I am getting promted by parameter boxes
saying "Enter Parameter Value".

What's going on?

Thanks in advance,
geebee
 
I think you threw me a curve when you wrote:
There is a field named [program1] with countrol source being "program" and....

Wouldn't this have more accurately been written:
There is a textbox named [program1] with countrol source being "program" and....

Okay, so try this instead:
=DSum("[authamt]","fy02_basetable","[program] = '"& Me![program] &"'")

Tom
_____________________________________


I have the following as you suggested as the control source:

=DSum("[authamt]","fy02_basetable","[program] = '"& Me![program1] &"'")

But now when I run the report, I am getting promted by parameter boxes
saying "Enter Parameter Value".

What's going on?

Thanks in advance,
geebee
 
Back
Top