Subscribe RSS
MS Access Reports and Dynamic Report Headers via VBA Part 2 Nov 07

A few entries ago I wrote about how to do dynamic report names in MS Access, and really thought I had the solution.  Well I sorta did.  It appears I was halfway to the solution. I ran into problems and at the time I was working at home on 2003 and it all seemed to work.

When I tried the same technique in 2007 at work it all stopped working and I was stumped.  I did work it out and the code I used is below in the fold.

The trick seems to be open the report in design mode.  Make the updates to the fields you want, including the query.  The close the report with the save option.  When you then next invoke the report the new parameters take affect and you are off.

I am not entirely sure if this is the ‘best’ way to do this but it certainly seems to work. What I’m so surprised about is that the entry I wrote before is referred to as its seems a burnign question.  I hope the code below helps people.

(oh after thinking more on this code, I know some will say it won’t work well in a heavy user environment.  My answer, in a heavy user environment why are you using Ms-access?

Category: Uncategorized
You can follow any responses to this entry through the RSS 2.0 feed. Both comments and pings are currently closed.

One Response

  1. 1
    Footsteps 

    Part Two of this entry is here and includes the code from production that works daily for us.  (I only got half the solution with the below) I have been spending the last few hours trying to figure out how I can take a single report, then update the head