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

    Error message that isn't?

    I have a form running the code shown below,

    when it runs, it get the RTE

    Click image for larger version. 

Name:	230911Focus1.jpg 
Views:	17 
Size:	41.9 KB 
ID:	50759



    and then Debug takes it to this line.

    Click image for larger version. 

Name:	230911Focus2.jpg 
Views:	17 
Size:	34.0 KB 
ID:	50760



    Pressing F5 or F8, the program continues just fine and the control gets focus.

    Anyone know what's going on?

  2. #2
    twgonder is offline Expert
    Windows 10 Access 2021
    Join Date
    Jun 2022
    Location
    Colombia
    Posts
    658
    I did some research. Most of the people had problems with fields that aren't visible, subforms, setting focus to a form without controls, etc.
    That's not the case here. The problem happends in two procedures, sporadicly, and in one procedure the F5 works better than in the other, as to continue the program.

    This seems to be a problem with Access for at least 5 years.
    I tried moving the offending line up in the code, but that doesn't seem to make much difference, it just becomes more sporadic.

  3. #3
    Minty is offline VIP
    Windows 10 Office 365
    Join Date
    Sep 2017
    Location
    UK - Wiltshire
    Posts
    3,003
    You can't move focus to a control that already has focus, I'm not sure if that situation could apply randomly?

    Totally unrelated: I would also always use Me. instead of Me! just because it checks the syntax pre-compilation.
    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 ↓↓

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

Similar Threads

  1. Replies: 14
    Last Post: 05-31-2020, 10:50 AM
  2. Replies: 1
    Last Post: 07-26-2016, 06:34 AM
  3. Replies: 7
    Last Post: 03-17-2016, 05:53 PM
  4. Replies: 5
    Last Post: 05-15-2015, 10:49 AM
  5. Replies: 15
    Last Post: 11-01-2013, 03:24 PM

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