Changing report format with VBA

N

Nick L

I have a report which prints out address labels for a journal distribution.
The label layout isn't always the same. If the addressee's subscription is
about to expire a warning is added to the label.
The problem I have is that the VBA code references fields in the underlying
query which are not used in the report itself (e.g. journal issue number).
I get an error message saying that the fields cannot be found.
So far the only way round this that I have discovered is to put all the
required additional information in a hidden text-box.
Is there a better way?

Nick.
 
A

Allen Browne

Hidden text box is the best solution.

Access just tries to be too smart, and doesn't bother fetching all fields if
it can't see them on the report. Adding the hidden text box works around the
problem.
 
N

Nick L

Thanks for that. I'm glad I was doing it the right way. It does make the
VBA quite readable.

Nick.
 

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