Public Function only called for details in first grouped header

P

pheron

I have 2 values in the detail section of my report that call a public
function in a common module. It works fine for the first "set" of
detail records within the first grouped header, but all subsequent
header groups display #Error -- essentially the function was never
called. Is this expected functionality (from Access, anyway)?

thanks in advance,
Patrick
 
D

Duane Hookom

You should be able to use a public function from almost any control source.
Can you share anything about the function or its arguments or return values
or whatever?
 
P

Patrick

Public Function GrossSalesPerEP(datValue As Date, curYTD As Currency,
varLocationEnplanements As Variant) As Currency

makes a DB call to get a value and returns a currency amount. 2 calls
per detail item. When adding a breakpoint in the function it is
clearly called for each detail item in the first header group and then
never called again. Ironically, after posting my earlier message I
added a sub report in the detail area (replaced the existing detail)
and it appears to make all the calls correctly. Not ideal (or
necessary), but it does seem to make the calls. I'll keep playing
with the orig.

thanks for any help you can provide.
Patrick
 
D

Duane Hookom

I would make sure you don't have nulls in your arguments other than the last
one.
 
P

Patrick

ok, I'm a bozo. print preview only generates the first page. I
hadn't wanted to print out on the printer since it's fairly large, but
once I did...

can you tell this is my first pseudo-complex access report. I used to
have a DW group to do this for me :)

thanks for taking the time.

Patrick
 

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

Top