Solved

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

Posted on 2010-09-22
6
614 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 47

Accepted Solution

by:
Dale Fye (Access MVP) earned 250 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
Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

 

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 250 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

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

When you are entering numbers in a speadsheet, and don't remember what 6×7 is, you just type “=6*7" instead. It works in every cell! This is not so in Access. To enter the elusive 42 in a text box, you have to find a calculator, and then copy the re…
I see at least one EE question a week that pertains to using temporary tables in MS Access.  But surprisingly, I was unable to find a single article devoted solely to this topic. I don’t intend to describe all of the uses of temporary tables in t…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …

929 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

12 Experts available now in Live!

Get 1:1 Help Now