Solved

Access Report Events

Posted on 2014-10-29
4
177 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
Placing my code in the OnFormat event worked.
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Article by: Nadia
Linear search (searching each index in an array one by one) works almost everywhere but it is not optimal in many cases. Let's assume, we have a book which has 42949672960 pages. We also have a table of contents. Now we want to read the content on p…
Entering a date in Microsoft Access can be tricky. A typo can cause month and day to be shuffled, entering the day only causes an error, as does entering, say, day 31 in June. This article shows how an inputmask supported by code can help the user a…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

772 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

10 Experts available now in Live!

Get 1:1 Help Now