Results 1 to 5 of 5
  1. #1
    Lounger
    Join Date
    Dec 2000
    Posts
    45
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Jumping Back a Screen? (Access 2000/SR1)

    Here is another of my novice questions <img src=/S/brickwall.gif border=0 alt=brickwall width=25 height=15>:

    We are emulating an old DOS system in which the escape key was
    programmed to take the user back to the previous screen - typical for
    DOS applications. Is there some "slick" way, in Access VBA, to save
    the form OpenArgs somewhere that is available from/to all forms? I
    know how to pass arguments from one form to another, on a one-to-one
    basis, but I am looking for a common place in which to store the form
    name and its required arguments.

    Any thoughts/suggestions would be greatly appreciated. TIA.

  2. #2
    Star Lounger
    Join Date
    Nov 2001
    Posts
    75
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Jumping Back a Screen? (Access 2000/SR1)

    I usually open my forms maximized and don't close them when moving to the next form. When the user finishes and closes the form they are back at the form that preceded the one they just closed. I guess this could be a problem with a ton of forms but it seems that very few are open at any given time. Just a thought....

    Jack

  3. #3
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Jumping Back a Screen? (Access 2000/SR1)

    Jack's method is the simplest. However, one ehancement that I use is to give each form a module level string variable CalledFrom. If you make this a private variable, you'll have to pass the name of the calling from in the OpenArgs string. If you make it a public variable, it becomes a property of the form and you can set it from outside the form. Either way, in the Close event of the called form, I check to see if CalledFrom is something besides a zero-length string. If it is, I use a DoCmd.SelectObject and pass it the CalledFrom string as the form name to select.
    Charlotte

  4. #4
    Lounger
    Join Date
    Dec 2000
    Posts
    45
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Jumping Back a Screen? (Access 2000/SR1)

    Jack and Charlotte:

    Thanks to you both for your suggestions. We may go Jack's way unless we end up with too many open forms. In that case, we'll use Charlotte's idea.

  5. #5
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Jumping Back a Screen? (Access 2000/SR1)

    Actually, I use it so the the *right* form floats to the top. It has nothing to do with the number of open forms.
    Charlotte

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •