Results 1 to 4 of 4
  1. #1
    sabbo64 is offline Novice
    Windows XP Access 2000
    Join Date
    Aug 2009
    Posts
    3

    Maintaining Control Focus

    Hi,
    I'm building a routine which updates a user's insurance details. There is no requirement to create new insurance records for renewed insurance accounts, however, if the user switches insurance provider a new record needs to be created. What I want to do is validate the 'Insurance number' (INo) field so that if the 'Insurer Name' field changes, the user is then prompted to change the INo field. How do I communicate with the user i.e. using msg boxes while maintaining focus on the field to be updated (the INo field). MSGBox idoesn't function in got/lostFocus event with setfocus

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Use the AfterUpdate event of the 'Insurer Name' control for your MsgBox and then SetFocus to the (INo) control.

  3. #3
    sabbo64 is offline Novice
    Windows XP Access 2000
    Join Date
    Aug 2009
    Posts
    3
    Fantastic. Thanks RG, it works a treat

  4. #4
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Outstanding! Glad I could help.

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

Similar Threads

  1. Setting Focus on a Form
    By MFeightner in forum Forms
    Replies: 1
    Last Post: 07-30-2009, 07:49 AM
  2. Set focus to another program
    By DrewB in forum Programming
    Replies: 1
    Last Post: 06-24-2009, 06:38 AM
  3. Replies: 2
    Last Post: 03-10-2009, 05:14 PM
  4. Keeping focus
    By ronatnc in forum Forms
    Replies: 0
    Last Post: 12-16-2008, 12:32 AM
  5. Sending control to specific control
    By wasim_sono in forum Programming
    Replies: 2
    Last Post: 04-19-2007, 08:19 AM

Tags for this Thread

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