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

x
?
Solved

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

Posted on 2013-10-30
3
Medium Priority
?
350 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 49

Accepted Solution

by:
Dale Fye earned 2000 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

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

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.
Windows Explorer lets you open cabinet (cab) files like any other folder. In VBA you can easily handle normal files and folders, but opening and indeed creating cabinet files takes a lot more - and that's you'll find here.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
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

916 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