Solved

Which form event to use to display a warning as soon as the form is displayed

Posted on 2013-10-30
3
341 Views
Last Modified: 2013-10-30
I think that the title probably asks the question.  I have a button that opens a form.  I want a run a check and display a MsgBox when the form displays.
I have the warning code working fine, but I have tried Load and Current for the events , but the warning displays before the form is presented.

Which event should I use?

I tried using the GotFocus event of the first field, but that displays before the form displays as well.

I'm sure this will be a quick answer for someone.

Regards

Richard
0
Comment
Question by:rltomalin
3 Comments
 
LVL 47

Accepted Solution

by:
Dale Fye (Access MVP) earned 500 total points
ID: 39611323
You might try the Timer event, set the timer interval to 250

Then as the first line of the Timer Event set the timer interval back to 0 (which turns it off).

Then put your code that displays your messagebox below that.
0
 

Author Comment

by:rltomalin
ID: 39611398
Hi fyed
Sorry - forgot to add the comments when closing.
This did the job, thanks very much.

Regards

Richard
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 39611410
Yes the "On Appear" event is an often wished for event.
;-)

Another approach would be to display this info on the form itself (in a textbox or label)
...then use a timer as fyed mentioned to turn it off

JeffCoachman
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

Most if not all databases provide tools to filter data; even simple mail-merge programs might offer basic filtering capabilities. This is so important that, although Access has many built-in features to help the user in this task, developers often n…
Experts-Exchange is a great place to come for help with solutions for your database issues, and many problems are resolved within minutes of being posted.  Others take a little more time and effort and often providing a sample database is very helpf…
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

920 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

13 Experts available now in Live!

Get 1:1 Help Now