Results 1 to 5 of 5
  1. #1
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Code Breaks on Unrecognized Control (97/2000)

    Has anyone else run into the problem with the VBA engine not recognizing a control in code, even though you selected the control name from the intellisense list? I've seen this in both Access 97 SR2 and Access 2000 SR1 and have yet to find a good reason for it. With a bound form, opening it in design view and reselecting the datasource will usually cure it, but I'm running into it on a form with no datasource behind the form and no controlsource behind the control. The one possibility I can think of here i that I copied the control in question from a bound form and simply removed the controlsource. It's just a textbox, nothing exotic, and I've tried decompiling, but that doesn't cure it. Nor does a compact. I've tried all the usual methods but nothing cures it. And now, the project seems to be toasted. This looks something like the problem with a conflict between AXP and A2k, but if it is, it's there in spite of the patch! <img src=/S/hairout.gif border=0 alt=hairout width=31 height=23>
    Charlotte

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Code Breaks on Unrecognized Control (97/2000)

    I've had this a few times in Access 97. Replacing Me.Controlname by Me![Controlname] (bang instead of dot, and square brackets even though the control name contained no spaces) got rid of the error, but I suppose you already used or tried this...

  3. #3
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Code Breaks on Unrecognized Control (97/2000)

    Ah yes, that has been a "solution" to some problems since the Stone Age of programming, I think. You never find out what was causing the problem. With stand-alone modules it sometimes helps to export the code as text, delete the module and then import the text file. That isn't very convenient for form modules, though - in Access 97, at least, the event procedures tend to become detached from their objects.

  4. #4
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Code Breaks on Unrecognized Control (97/2000)

    I had to retype the statement that was breaking exactly as it was before and then it stopped misbehaving. <img src=/S/hairout.gif border=0 alt=hairout width=31 height=23>
    Charlotte

  5. #5
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Code Breaks on Unrecognized Control (97/2000)

    I tried that too and it had no effect. <img src=/S/bummer.gif border=0 alt=bummer width=15 height=15> Retyping it was the only thing that worked. We have this problem with 97 databases compacted out of Visual Source Safe at work, but I had never run into it on my laptop at all. I still suspect the vbe6.dll conflict between A2k and AXP. <img src=/S/shrug.gif border=0 alt=shrug width=39 height=15>
    Charlotte

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •