Solved

Access Report Events

Posted on 2014-10-29
4
220 Views
Last Modified: 2014-10-31
I am using the report_open event in access and I have code in it to change the value of a text box for each different item that loads. It fires the correct amount of times, but it fires too soon. Is there a way to wait for the elements on the page to load and then run the function? Right now all my data is shifted down one item. The level and title are the items that are wrong. The rest of the data is correct. The level and title for the first item are blank, but the level and title for the second item should be in the first items place and the third item in the second. It is also not running the last items level and title. This is the screenshot of the report.
0
Comment
Question by:rcimasi
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 30

Expert Comment

by:hnasr
ID: 40412663
Quick reply, try the load event.

If more work is needed, upload a sample report demonstrating the issue.
0
 
LVL 58

Accepted Solution

by:
Jim Dettman (Microsoft MVP/ EE MVE) earned 500 total points
ID: 40412950
Not sure I'm understanding the setup, but it would either be the OnLoad as hnasr suggested or more normally, the OnFormat events of each of the bands (report header, page header, group header, detail, group footer, page footer, and report footer).

 OnPage fires after the page is full rendered, but your limited in what you can do at that point.


Jim.
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 40413988
Please reply to the above two experts first...

I have code in it to change the value of a text box for each different item that loads.
Is there a way to wait for the elements on the page to load and then run the function?
Can you clearly explain what that means?, ...and provide an explanation or example?
what is this function? What does it change and why?

For example, If your report is based on a table or query, ...then what needs to "change" for each record or group?...
...In other words, perhaps there is a better way to accomplish this...
(Perhaps adding the function to be called in a field in the reports recordsource/query, ...instead of trying to do this with report events.

JeffCoachman
0
 

Author Closing Comment

by:rcimasi
ID: 40416067
Placing my code in the OnFormat event worked.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this post we will learn different types of Android Layout and some basics of an Android App.
When there is a disconnect between the intentions of their creator and the recipient, when algorithms go awry, they can have disastrous consequences.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
Introduction to Processes

717 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question