Solved

Access Report Events

Posted on 2014-10-29
4
191 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
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 57

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
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 …

895 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now