Dlookup in Report Footer

  • Thread starter Krzysztof via AccessMonster.com
  • Start date
K

Krzysztof via AccessMonster.com

Hello and good afternoon everyone!

i have a report and i need to summarize at the end in a way that only leads
me to dlookup as the answer.

i have in the past, used them in reports, i have no problem, and now, because
deadline is very soon, i cannot make it work. So, i have a text field on
report footer, nothing fancy.

=Dlookup("Sum([Split1])","Dual Union","[Type]='Contract'")

split1 = num field
Dual union = my query
type = text formula

i do these alot and can't figure out why it is not working?

may becaus i have bound report to the same query?

VMTIA~
 
T

Tom Lake

Krzysztof via AccessMonster.com said:
Hello and good afternoon everyone!

i have a report and i need to summarize at the end in a way that only
leads
me to dlookup as the answer.

i have in the past, used them in reports, i have no problem, and now,
because
deadline is very soon, i cannot make it work. So, i have a text field on
report footer, nothing fancy.

=Dlookup("Sum([Split1])","Dual Union","[Type]='Contract'")

Can you use the Sum function there? If so that's a new one on me.

What do you expect the DLookup function to return?

Tom Lake
 
D

Duane Hookom

You should define "cannot make it work". I would try
=Sum(Abs([Type]="Contract") * [Split1])
or
=DSum("[Split1]","[Dual Union]","[Type]='Contract'")
 
K

Krzysztof via AccessMonster.com

i get #ERROR as a result -

and yes, you can do a sum inside that function - it just basically adds all
[split1] field values where the [type] field = 'Contract' i do this very
often in several db's but i had though that it was a problem because it was
in a report, but i put it in a form, which i know it can work there, and same
stupid #ERROR. it must be field name or syntax - i will try other formulas
Thanks

~K


Duane said:
You should define "cannot make it work". I would try
=Sum(Abs([Type]="Contract") * [Split1])
or
=DSum("[Split1]","[Dual Union]","[Type]='Contract'")
Hello and good afternoon everyone!
[quoted text clipped - 18 lines]
 
D

Duane Hookom

I had tested and known that Sum() would work in a domain aggregate function.
Is [Dual Union] a query or table? Does it require a parameter?
Is the Type field text?
Is the Split1 field numeric? Might it be Null?

--
Duane Hookom
MS Access MVP
--

Krzysztof via AccessMonster.com said:
i get #ERROR as a result -

and yes, you can do a sum inside that function - it just basically adds
all
[split1] field values where the [type] field = 'Contract' i do this very
often in several db's but i had though that it was a problem because it
was
in a report, but i put it in a form, which i know it can work there, and
same
stupid #ERROR. it must be field name or syntax - i will try other
formulas
Thanks

~K


Duane said:
You should define "cannot make it work". I would try
=Sum(Abs([Type]="Contract") * [Split1])
or
=DSum("[Split1]","[Dual Union]","[Type]='Contract'")
Hello and good afternoon everyone!
[quoted text clipped - 18 lines]
 
K

Krzysztof via AccessMonster.com

YOU THE MAN!!!!
that abs() function worked like a charm!!!

i was a little nervous at first because i had not used that function before,
but it works fine now!!!!

i still don't know why my dlookup is not working, but who cares!

lifesaver, you are

THANKS!

Duane said:
I had tested and known that Sum() would work in a domain aggregate function.
Is [Dual Union] a query or table? Does it require a parameter?
Is the Type field text?
Is the Split1 field numeric? Might it be Null?
i get #ERROR as a result -
[quoted text clipped - 21 lines]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top