Results 1 to 3 of 3
  1. #1
    tagteam is offline Competent Performer
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2013
    Posts
    486

    Onload event doesn't work for filter

    I am trying to set the focus field AFTER the filter by form. I have assigned DoCommand.RunCommand acCmdFilterByForm to a button. I tried to put me.[FieldName].SetFocus but it tells me that the code can't be used at this point. I have tried putting it before the run command but that doesnt seem to do anything.



    My form has a tabbed interface and fields not in the tabbed interface on it and it always defaults to the first field in the tabbed interface when i want it to default to a field not in the tabbed interface.

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    What is the Tab Index property of the controls set to? Make the desired textbox set to 0.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    tagteam is offline Competent Performer
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2013
    Posts
    486
    Yes, that was the problem. I have adjusted the tab order and it is working like I would like now. Thanks

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

Similar Threads

  1. Just doesn't seem to work!
    By txmmoore in forum Reports
    Replies: 9
    Last Post: 01-16-2014, 11:39 AM
  2. Can Grow doesn't work
    By gg80 in forum Reports
    Replies: 6
    Last Post: 05-13-2011, 07:14 PM
  3. Replies: 7
    Last Post: 01-19-2011, 10:39 AM
  4. Filter on subform doesn't work
    By Edwardo in forum Programming
    Replies: 6
    Last Post: 11-29-2010, 08:57 PM
  5. Query doesn't work the day after
    By sithis876 in forum Queries
    Replies: 1
    Last Post: 07-13-2010, 07:11 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