none
Intellinonsense issue RRS feed

  • Question

  • Hi Folks,

    I’m hoping someone has some advice on how to resolve a problem I am having with intellisense.

    I can open any form in the latest version of my Access 2010 application (V1) in design view, view the code window, and intellisense works. If I start the application from the Splash form (which is the designated first form to open), then open any form in design view, and view its code, intellisense still works. If I hit the continue button on the Splash form, the Switchboard form opens as it should. If I then open any form in design view, intellisense no longer works: it cannot find objects on the form, the text turns red, and it removes typed spacebar characters so that words run into each other. So I thought there was a problem with the Switchboard form. So I found the last version (V2) where I could open the Splash form, then the Switchboard form, and intellisense still worked. Then I replaced the Switchboard form in V1 with the Switchboard form from V2. But that did not fix it: intellisense still did not work in V1. V1 compiles fine. Things I have tried that had no effect:

    1. Decompile, recompile, then Compact and Repair.
    2. Importing all the objects in V1 into a new database, followed by “1” above.
    3. Ran a “repair” on Office 2010 from Windows Settings.

    V1 appears to work OK, but some debugging/coding is best done in forms opened from the Switchboard form, which is frustrating. V2 dates from November 2018. The application is large (73 tables, 208 forms, 254 queries), and many forms have had changes since then. I’m hoping to avoid having to repeat all the coding changes I’ve made in the past 9 months, one-by-one, to determine which if any caused the problem. Plus: only the Switchboard Load event and Open event run, between the time when intellisense is still functional (after Splash form opens) and when it is dysfunctional (after Switchboard opens). If I put breakpoints at the end of these events, intellisense is still functional. So my code does not seem to induce the problem: it is induced by the form actually opening. But then it still happens with the “good” form from V2 when inserted into V1! Please help!

    Monday, September 2, 2019 6:14 PM

Answers

  • This sounds a lot like what happens when there is a form with a Timer event running.  Do you by any chance have the Timer event active on any open form, whether hidden or not?

    Dirk Goldgar, MS Access MVP
    Access tips: www.datagnostics.com/tips.html

    • Proposed as answer by Gustav BrockMVP Tuesday, September 3, 2019 7:08 AM
    • Marked as answer by RobH18 Tuesday, September 3, 2019 4:48 PM
    Monday, September 2, 2019 8:17 PM

All replies

  • Well your case is bizarre according to your writing but i am not sure if i am getting to "correct" picture.

    Maybe share some screenshots to understand where the whole situation fails...

    Monday, September 2, 2019 7:13 PM
  • This sounds a lot like what happens when there is a form with a Timer event running.  Do you by any chance have the Timer event active on any open form, whether hidden or not?

    Dirk Goldgar, MS Access MVP
    Access tips: www.datagnostics.com/tips.html

    • Proposed as answer by Gustav BrockMVP Tuesday, September 3, 2019 7:08 AM
    • Marked as answer by RobH18 Tuesday, September 3, 2019 4:48 PM
    Monday, September 2, 2019 8:17 PM
  • Hi Dirk,

    Thanks for that suggestion. That was indeed the problem. The Open event of the Switchboard form calls a function IdleTimer that opens a hidden form with a Timer event, if set to be used, as set by an AutoClose Boolean stored in the back end. The only reason V2 worked was that it was linked to a different back end, where AutoClose was set to false. In V1, AutoClose was set to true.

    So I can easily circumvent the problem for development.

    But now the big question is: could using AutoClose in the production (.accde) version have any unforseen impact on the application functionality?

    Rob

    Tuesday, September 3, 2019 4:48 PM
  • Hi John,

    When Intellisense works I can type Me. and a list of objects on the form appears, that I can scroll through:

    When it does not work I get:

    Also, when I try to type an "If" statement with the Boolean FromChemicals, bad Intellisense removes the spaces:

    Dirk found the problem. Not that I understand it, but I can work around it.

    Rob

    Tuesday, September 3, 2019 4:58 PM
  • But now the big question is: could using AutoClose in the production (.accde) version have any unforseen impact on the application functionality?

    In production, I don't think it will have any effect.  I suppose it might, if you have a form in which text entry is taking place when the timer fires, but I'm not sure of that, and that may not be the case.  As a general principle, depending on what the timer is doing, it makes sense to turn it off when it's no longer needed.


    Dirk Goldgar, MS Access MVP
    Access tips: www.datagnostics.com/tips.html

    Tuesday, September 3, 2019 5:01 PM
  • I the 2nd occasion it seems like you are using "SendKeys" somewhere....but its bizzare....do you add references on the fly ?
    Tuesday, September 3, 2019 6:33 PM
  • I the 2nd occasion it seems like you are using "SendKeys" somewhere

    John - 

    I think this behavior is also caused by the firing of the Timer event.  When it fires, the VB procedure being edited briefly loses focus, and when it does, the trailing space on the end of the line currently being edited is trimmed off.  So if the user has type "if " and then the timer fires, the line is trimmed to "if".  As the user proceeds to type "FromChemicals ", the line becomes "ifFromChemicals ".  If the timer then fires again, the line is trimmed to "ifFromChemicals", and as the user continues to type "Then" the line becomes "ifFromChemicalsThen".

    This behavior of course depends on the TimerInterval, but if the timer fires multiple times as the line is being typed, you can easily end up with "ifFromChemicalsThen".  Only the trailing space is trimmed off each time.


    Dirk Goldgar, MS Access MVP
    Access tips: www.datagnostics.com/tips.html

    Tuesday, September 3, 2019 7:13 PM
  • Dirk is right: the Timer Interval was set to one second. The Intellisense would briefly show and then change to intellinonsense. I have now changed the interval to 100 seconds, and Intellisense allows me to type a line. Although for development I now have it switched off.
    Thursday, September 5, 2019 4:19 PM