What is the best way to create a "wizard"?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Seth Schrock
    Recognized Expert Specialist
    • Dec 2010
    • 2965

    #1

    What is the best way to create a "wizard"?

    I’m trying to create a “wizard” like way to go through a series of steps to setup a job (requiring changes to multiple tables through many different views created by queries) by clicking a “Next” button. A back button would also be available if that makes a difference. I see a couple of options, but would like some advice as what considerations should be made to choose the best option. New ideas are welcome too! This is the first time that I have done something like this, so I have no personal experience with any of these ideas, so don’t laugh too hard.

    1. Create a separate form for each stage of the wizard and have the Next button open the next form and close the current form. I don’t really like this idea because of the delay between clicking next and being able to actually edit the next form. Forms can sometimes take a while to load if the computer is running slow.

    2. Use tab controls with each stage of the wizard on a separate tab. The Next button just sets the focus to the next tab. This could lead to a lot of controls to load at the beginning making it take forever.

    3. Use code to change the recordsource of the form to the next query. The queries could be setup so that the fields are aliased to generic names such as “Field1”, Field2”, etc. so that control data sources wouldn’t have to be changed. Controls that aren’t used could be made invisible. This would require a lot of code.

    4. Have each stage as a subform and just edit the visibility status of each form as needed. Might have to resize and change the location of each subform as they are made visible.

    Like I said, this is new to me and these are just the ideas that came to me. Criticism of any or all of my ideas is welcome. I believe that I can implement each of these solutions, so exact details aren’t needed, just which path I should take. If I stumble on the chosen path, I will post that separately.
  • zmbd
    Recognized Expert Moderator Expert
    • Mar 2012
    • 5501

    #2
    For "wizard" type actions I usually use a tab controlled form.
    THe coding can be quite complex, the the very simple.

    Comment

    • TheSmileyCoder
      Recognized Expert Moderator Top Contributor
      • Dec 2009
      • 2322

      #3
      The only thing I will downright recommend AGAINST is 3)
      A nightmare to maintain.

      My recommendation would be a combination of the tab and the subform approach. A tabbed form with 1 subform in each tab. Note however that the table updates (for bound tables) are performed "as you go". I.e. there is no global rollback possible for the form collection as a whole.

      Comment

      • Seth Schrock
        Recognized Expert Specialist
        • Dec 2010
        • 2965

        #4
        It sounds like the tab control is the way to go. I will pursue that option. Thanks to both of you. Unfortunately I can't choose both answers as best answer, but they basically give the same answer.

        Comment

        • ADezii
          Recognized Expert Expert
          • Apr 2006
          • 8834

          #5
          Custom Wizards

          A 'Custom Wizard', one that is integrated into Access itself, is an Add-In. You must follow a strict set of Rules for its creation, but once created becomes a part of Access itself. A Wizard will allow you to extend your Database in a way that is unique and tightly integrated.

          Comment

          • Seth Schrock
            Recognized Expert Specialist
            • Dec 2010
            • 2965

            #6
            The MSDN website that is supposed to tell how to create a wizard add-in is broken (tried with two different browsers). Do you have a link to tell how?

            Comment

            • ADezii
              Recognized Expert Expert
              • Apr 2006
              • 8834

              #7
              Originally posted by Seth Schrock
              The MSDN website that is supposed to tell how to create a wizard add-in is broken (tried with two different browsers). Do you have a link to tell how?
              I do not have a Link on this Topic, but the best Reference that I can give you is:
              Access 2002 Desktop Developer's Handbook
              Chapter 18
              Developing Custom Wizards
              Page 1162

              Comment

              • Seth Schrock
                Recognized Expert Specialist
                • Dec 2010
                • 2965

                #8
                Thanks ADezii. I will look it up and see if I can get it through interlibrary loan.

                Comment

                Working...