Results 1 to 7 of 7
  1. #1
    injanib is offline Advanced Beginner
    Windows 7 64bit Access 2007
    Join Date
    Jan 2011
    Posts
    67

    Lock Focus on the Current Form

    Hi all.



    I have an unbound form that opens up as dialog box. It is used to write data into the underlying table of the form from which this form is launched. There is a cancel button and a save button. The cancel button simply closes the form. The save button writes the data entered in the form into a table and then closes. What I need to do is to lock the focus on this form, so that it beeps if the user clicks outside this form and keep this form on the top, until either the cancel or save button is clicked.

    thanks in advance

  2. #2
    nicknameoscar is offline Advanced Beginner
    Windows XP Access 2000
    Join Date
    Apr 2011
    Location
    Earlysville, VA
    Posts
    91
    Check out the Modal property in the Other tab of the form properties window.

    The below quote is from the description in the Help files:

    "When a form opens as a modal window, you must close the window before you can move the focus to another object."

    Ooops, forgot about you wanting it to beep...although it may. I can't remember.
    Last edited by nicknameoscar; 05-27-2011 at 12:54 PM. Reason: realized I forgot something

  3. #3
    injanib is offline Advanced Beginner
    Windows 7 64bit Access 2007
    Join Date
    Jan 2011
    Posts
    67
    Whoah! That easy huh! I feel dumb now. That works great. Thank you very much. Yes it does beep. Even if it didn't, I could live without it.

    Thanks again.

  4. #4
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Are you ready to use the Thread Tools and mark this thread as Solved?

  5. #5
    khalid's Avatar
    khalid is offline MS-Access Developer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2010
    Location
    Kuwait
    Posts
    244
    Quote Originally Posted by RuralGuy View Post
    Are you ready to use the Thread Tools and mark this thread as Solved?
    RuralGuy, may be he doesn't know how to mark it solved
    can you explain please :eace::

  6. #6
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    5th item down at the top of the thread under Thread Tools.

  7. #7
    injanib is offline Advanced Beginner
    Windows 7 64bit Access 2007
    Join Date
    Jan 2011
    Posts
    67
    Thanks, I will make sure to mark as "Resolved" from now on.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Any change of focus on form Event?
    By trb5016 in forum Forms
    Replies: 1
    Last Post: 02-11-2011, 08:25 PM
  2. Replies: 4
    Last Post: 01-23-2011, 09:01 PM
  3. Replies: 1
    Last Post: 12-10-2009, 09:58 PM
  4. Setting Focus on a Form
    By MFeightner in forum Forms
    Replies: 1
    Last Post: 07-30-2009, 07:49 AM
  5. Can I lock out fields in a form by keying off...
    By swampdonkey in forum Access
    Replies: 2
    Last Post: 09-07-2006, 07:16 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums