Results 1 to 4 of 4
  1. #1
    twgonder is offline Expert
    Windows 10 Access 2021
    Join Date
    Jun 2022
    Location
    Colombia
    Posts
    658

    Sendkeys not compiling

    I've got a form that may try to setfocus to a control that's not enabled.


    So, I'm working on a sub to pass focus to the next sequential tabbed control.

    I've tried to samples from outside threads,
    the first one doesn't work and the second suggested solution won't compile.

    I can't figure out why the compiler doesn't like the "{" for the TAB I want to send.
    Click image for larger version. 

Name:	240413sendkey01.png 
Views:	15 
Size:	16.6 KB 
ID:	51676

    I've even tried copying the {TAB} from the MS help page for sendkeys.

    I'm using a Latin keyboard, and the Region is set to Colombia.
    I've tried the "[" and "(" to no avail.

    I would like to avoid SendKeys, but the first suggestion that's commented out throws this RTE:
    Application-defined or object-defined error

    Post note: Okay, dummy me, needs to be in quotes.
    Still, I would like to do it without SendKeys (love how it tabs in the VBA Editor while stepping through the code)
    Last edited by twgonder; 04-12-2024 at 11:40 PM. Reason: found problem

  2. #2
    twgonder is offline Expert
    Windows 10 Access 2021
    Join Date
    Jun 2022
    Location
    Colombia
    Posts
    658
    Also, cool if there is a way to just go to the first tab, and if it's not active go to the first that is active.
    Access may do the second half of this automatically.
    When I mention tab, I don't mean the Tab Control, I mean the Tab Order of objects on the form.

  3. #3
    Minty is offline VIP
    Windows 10 Office 365
    Join Date
    Sep 2017
    Location
    UK - Wiltshire
    Posts
    3,003
    DLookup Syntax and others http://access.mvps.org/access/general/gen0018.htm
    Please use the star below the post to say thanks if we have helped !
    ↓↓ It's down here ↓↓

  4. #4
    twgonder is offline Expert
    Windows 10 Access 2021
    Join Date
    Jun 2022
    Location
    Colombia
    Posts
    658
    @ Minty, post# 3 Thanks, didn't see that in any of my Google searches, but a quick read tells me a second pass at understanding it, with some modifications, will do the trick.

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

Similar Threads

  1. Compiling Two Queries Together
    By oleander in forum Queries
    Replies: 3
    Last Post: 11-30-2017, 01:07 PM
  2. Some errors on compiling
    By Lou_Reed in forum Access
    Replies: 14
    Last Post: 03-29-2017, 12:52 PM
  3. Compiling items with same ID horizontally
    By tomahs in forum Access
    Replies: 3
    Last Post: 06-04-2011, 12:36 AM
  4. Compiling Data, Not Replacing
    By helpaccess in forum Access
    Replies: 12
    Last Post: 03-08-2011, 03:13 PM
  5. Compiling for distribution
    By wthoffman in forum Access
    Replies: 1
    Last Post: 02-03-2011, 09:34 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