Form Load Cancel

Posted on 2007-07-26
Last Modified: 2007-07-26
Hi Experts

I need a clean way to cancel a forms load event and change the focus to a different form and load the other form.

My application starts and a splash screen loads, then form1 loads the mainstay of form1 is a listview, if the listview has no rows then Form2 should load and take the focus. At what point should I stop the form loading, bearing in mind that the form1 is the main start up form. Should I test the sql that fills the listview at form1s load  and then change the start form to form2. Or should I test the sql when the splash screen loads and change the form load at this time, what is the best option?
Question by:JoeBo747
    LVL 48

    Accepted Solution

    >> should I test the sql when the splash screen loads and change the form load at this time

    This is the best option. You are testing if no prob with the connection ?
    LVL 6

    Assisted Solution

    It is good to load data from splash and if rows existing, you can decide which one to open. Form1 or Form2. There by you reduce loading and closing of one form. If u r loading or retriving data from form1 , it is not making any difference bcos one call to database any way u need.

    hope it clear u.
    LVL 1

    Author Comment

    Hi jpaulino: & riyazthad:

    Thanks for the quick response, both of you have valid points I hope you think the points are fair>


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
    You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
    Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
    Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

    737 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

    22 Experts available now in Live!

    Get 1:1 Help Now