Public Function only called for details in first grouped header

  • Thread starter Thread starter pheron
  • Start date Start date
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
 
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?
 
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
 
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
 
Back
Top