Results 1 to 5 of 5
  1. #1
    sergran is offline Competent Performer
    Windows 7 64bit Access 2007
    Join Date
    Jun 2013
    Posts
    115

    Focus problem

    Hello, I have a problem with the mask that I am attaching.
    In the mask F_main2, writing a word in the combobox "Notes", is copied to the combobox "recensione_traccia_01" by pressing the space bar on the keyboard.


    The problem is that it gives me the error "run-time in 2110."
    I need that after moving the focus through the space bar from combo "notes" alal combo "review track 01" with Event "turned on" in the combobox "recensione_traccia_01", the focus must return to the combo "notes".
    Could you help me?
    Thank you very much
    Attached Files Attached Files

  2. #2
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows XP Access 2003
    Join Date
    Aug 2013
    Posts
    7,862
    How are you employing the space bar, through Send Keys? Why not just use the built in Tab key function within Access? I use .SetFocus in the AfterUpdate event or after running some VBA that runs SQL or something

  3. #3
    sergran is offline Competent Performer
    Windows 7 64bit Access 2007
    Join Date
    Jun 2013
    Posts
    115
    It in fact would be more logical but I should insert the words to write a text in the combo "Recensione_traccia_01" and am used to press the space bar, or with the tab should commit several mistakes

  4. #4
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows XP Access 2003
    Join Date
    Aug 2013
    Posts
    7,862
    That is a problem then. I don't use send keys so it sounds like a problem beyond my capabilities. I try to stay within conventional structure whenever possible. Perhaps researching what the error code stands for can point you in the correct direction.

    If it is associated with the setfocus action within VBA the debugger should catch it and show you the line. Because you are using a method unfamiliar to me via the space bar all I can suggest is to look at the control you are attempting to setfocus and make sure it is enabled and visible = True or it is busy for some other reason like you are closing a form, you have focus on another form etc.

  5. #5
    sergran is offline Competent Performer
    Windows 7 64bit Access 2007
    Join Date
    Jun 2013
    Posts
    115
    Ok thank you very much ...... I try another solution
    thanks
    Hello

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

Similar Threads

  1. constantly needs focus
    By Dazza666 in forum Programming
    Replies: 4
    Last Post: 08-06-2013, 07:53 PM
  2. Replies: 2
    Last Post: 10-13-2011, 08:45 AM
  3. Will not set focus
    By AKQTS in forum Programming
    Replies: 4
    Last Post: 05-04-2011, 06:38 AM
  4. Text Get Focus
    By blueraincoat in forum Forms
    Replies: 4
    Last Post: 03-14-2011, 06:10 PM
  5. Keeping focus
    By ronatnc in forum Forms
    Replies: 0
    Last Post: 12-16-2008, 12:32 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