Results 1 to 4 of 4
  1. #1
    Thomasso is offline Competent Performer
    Windows 10 Office 365
    Join Date
    Nov 2016
    Location
    Czech Republic
    Posts
    250

    VBA editor automatically adding unwanted characters

    Hello,



    I've run into this strange issue while coding Access VBA. All of the sudden, the editor started to add all sorts of characters while typing, moves the cursor etc.

    For example, I type:
    • MsgBox "
    • VBA adds another quote (MsgBox "")


    Another example:
    • MsgBox "Test" (then I press spacebar)
    • VBA deletes the new space and returns the cursor behind the second quote



    This is extremely annoying, I can't type anything meaningful like this. I tried looking into the editor options, but did not find such setting.

    This definitely wasn't happening before and I am not aware of changing anything.


    Can you please help me to turn this behaviour off? Thank you very much.

    Tomas

  2. #2
    Minty is offline VIP
    Windows 10 Office 365
    Join Date
    Sep 2017
    Location
    UK - Wiltshire
    Posts
    3,001
    Sounds like you possibly have a form open that has a timer function running whilst you are editing the VBA.

    Every time the timer fires you'll lose focus from the editor and it will finish off as if you pressed new line or clicked back onto a form.
    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 ↓↓

  3. #3
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,397
    With regards your first example, a single double quote is invalid so will automatically add a second when you hit return

  4. #4
    Thomasso is offline Competent Performer
    Windows 10 Office 365
    Join Date
    Nov 2016
    Location
    Czech Republic
    Posts
    250
    Quote Originally Posted by Minty View Post
    Sounds like you possibly have a form open that has a timer function running whilst you are editing the VBA.

    Every time the timer fires you'll lose focus from the editor and it will finish off as if you pressed new line or clicked back onto a form.
    Ah, that's it! That behaviour is kind of inconvenient, but at least I know why it happens now.

    Thank you!

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

Similar Threads

  1. Query Editor, Form Explorer, Rowsource editor
    By davegri in forum Sample Databases
    Replies: 24
    Last Post: 04-25-2023, 08:09 AM
  2. Replies: 5
    Last Post: 04-04-2018, 10:43 AM
  3. Replies: 3
    Last Post: 10-27-2014, 02:35 PM
  4. Replies: 5
    Last Post: 07-21-2012, 07:30 AM
  5. Replace function adding in unwanted carriage return
    By timmygrover in forum Queries
    Replies: 10
    Last Post: 07-02-2012, 11:58 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