Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Which "event" can be used after a record in a Form is displayed?

Posted on 2010-09-22
6
Medium Priority
?
791 Views
Last Modified: 2012-05-10
I am developing an Access 2007 front-end to a SQL Server 2007 database.
I have a an Access Form that displays a customer order and allows it to be modified.
"Notes" can be added to an order and I would like to "pop up" these notes in a separate form when an order record is first displayed to make the user aware of them.
When I do this in the "Form_Current" event, my notes pop up OK, but this happens before the order is fully displayed. I would like the Order Form to be displayed first and my notes popped up before the operator starts to work on the order.
I have tried other events including "After Rendering" and "After Final Rendering" but these never appear to happen.

Can anyone tell me which event I should use to display my notes just after the order form has been populated and displayed?

Many thanks.
0
Comment
Question by:colinasad
6 Comments
 
LVL 65

Expert Comment

by:rockiroads
ID: 33737548
the afterfinalrender I think is for pivotcharts not record loaded

Are these notes optional? If so then would it make sense to have a button called Open Notes which then opens up your notes form?

Failing that maybe add

me.setfocus

after the call to open notes so that your main form has focus and notes window would be behind main form
0
 
LVL 49

Accepted Solution

by:
Dale Fye earned 1000 total points
ID: 33737921
If you are not using the timer Event for anything else, you could use the

Form_Current event to set the TimerInterval to 1000 (for a 1 second delay), then use the Timer Event to Open your Notes form and then reset the TimerInterval to 0.
0
 
LVL 75
ID: 33738001
"Which "event" can be used after a record in a Form is displayed?"
After a record is 'displayed', either by a search or using the Nav buttons, the Form Current event triggers.

You may find this handy also:

http://office.microsoft.com/en-gb/access/HP051867611033.aspx

"Can anyone tell me which event I should use to display my notes just after the order form has been populated and displayed?"

The cleanest way to do this is with a Button that opens a Note form.

mx
0
Technology Partners: 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!

 

Author Comment

by:colinasad
ID: 33738252
Thanks for the prompt responses.
I'm away from that project at the moment, but will try some of the suggestions when I get back to it.

Just for further information.
I do already have a "tab" on the main Order Form that allows the operator to see and edit the notes. I also have a "There Are Notes" "label" on the main Order Form that I make visible if there are notes associated with the order, but I keep it invisible if there are no notes. However, my client wants the full notes to be thrown up in the operator's face when they open an order that has them. This will force the operator to read the notes which usually contain important details about how the order should be handled.

I am currently opening a "modal" Notes Form from the Order Form's "Form_Current" procedure, but the current order record isn't actually displayed on the screen at that time, but immediately appears when the Notes Form is closed. I just feel it would look better if the populated Order Form was visible in the background when the Notes are displayed. As well as making the Notes Form "modal", I also use the "acDialog" mode when I open it from my main Order Form - might that be preventing the Order Form from becoming visible?

I'll experiment further when I work on that project again tomorrow.

Many thanks.
0
 
LVL 65

Assisted Solution

by:rockiroads
rockiroads earned 1000 total points
ID: 33738600
I have tried but was unable to reproduce your problem with main form not displaying data.

Are there any unbounded elements in there?.or calculated fields or something or is this strictly based on the form's recordsource so you have no other processing on form_current

if u use acDialog then there should be no need to set it as Modal
0
 

Author Closing Comment

by:colinasad
ID: 33741724
I think it was my "acDialog" mode that brought up my Notes Form but delaying the displaying of my Order Form. After removing "acDialog", my Order Form is displayed but hides the Notes Form which is displayed first but still "modal".
I used the "Timer Interval" on my Notes Form to bring it to the fore after 1 second.
Thanks for the suggestions - hope you don't mind me splitting the points.
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

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

Code that checks the QuickBooks schema table for non-updateable fields and then disables those controls on a form so users don't try to update them.
Explore the ways to Unlock VBA Project Password Excel 2010 & 2013 documents. Go through the article and perform the steps carefully to remove VBA Excel .xls file.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Suggested Courses

963 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