Results 1 to 10 of 10
  1. #1
    New Lounger
    Join Date
    Jul 2001
    Location
    london uk
    Posts
    23
    Thanks
    0
    Thanked 0 Times in 0 Posts

    syntax problem (Access 2000)

    I have some code originally written for access 97 but imported into access 2000 of the form forms.formname.visible = true/false. It has been fine up to now. Yesterday, I began to get run-time errors when running the code. It compiles without complaint but to make it work at all I now need to format the code as forms!formname.visible = true/false. form_formname.visible= true/false also works. Might this be due to a windows/office update?

    Its really annoying because I'm getting ready t go live with an application and the last thing I need is to have to go through the code fixing things again. On that note, I can find the offending code using find forms.f* but replacing won't work. Is there some clever regex that will?

  2. #2
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts

    Re: syntax problem (Access 2000)

    If i understand you and you want to replace a pice of code with another piece of code then use Rick Fishers Find and Replace. It's free for 30 days, however the cost is well worth it.

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

    Re: syntax problem (Access 2000)

    Here is a link to the utility that patt mentioned: Find and Replace for Microsoft Access.

    PS the "private" e-mail address in your profile is no longer valid, so e-mail notifications of replies to your post are bouncing. Please go to Edit profile and enter a working e-mail address in the box "Email Address (for our administrative use only...not visible to other users)".

  4. #4
    New Lounger
    Join Date
    Jul 2001
    Location
    london uk
    Posts
    23
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: syntax problem (Access 2000)

    thank you both for the link and I've fixed my email address. Have any of you any ideas as to why the original problem surfaced?

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

    Re: syntax problem (Access 2000)

    I don't know - I've always used the Forms! notation, in Access 95 and all later versions. When I read your post, I tried the notation with Forms. in Access 2002 SP3, and it worked OK too.

  6. #6
    New Lounger
    Join Date
    Jul 2001
    Location
    london uk
    Posts
    23
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: syntax problem (Access 2000)

    It always used to work for me and it would let me choose from the intellisense menu too. Now the intellisense menu just has 4 options - item, parent, count and another one. I don't mind there being more than one way of doing things, its when it suddenly stops working that annoys me especially as it continues to compile without error. I thought that was the point - to pickup syntax errors.

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

    Re: syntax problem (Access 2000)

    IntelliSense doesn't show the names of individual forms when you type Forms. because the Forms collection contains the forms that are currently loaded. When you run the code, this collection will probably not have the same members as when you wrote the code, so IntelliSense cannot predict which members it should display. Hence you only see the standard properties Application, Count, Item and Parent.

  8. #8
    New Lounger
    Join Date
    Jul 2001
    Location
    london uk
    Posts
    23
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: syntax problem (Access 2000)

    maybe its not intellisense then. What I mean is that when I type forms.formname and a period it would show me a list of allowed options. The list used to be longer and include things like visible. Now I just get the options I mentioned earlier

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

    Re: syntax problem (Access 2000)

    Access 97 had its own implementation of the Visual Basic Editor, Access 2000 and later use the same editor as the other Office applications. So perhaps this capability was present in Access 97 (I can't remember, it's too long ago) and had to be removed in later versions for compatibility reasons.

  10. #10
    New Lounger
    Join Date
    Jul 2001
    Location
    london uk
    Posts
    23
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: syntax problem (Access 2000)

    Its still weird though. I am reminded of Karate kid - karate do - ok, karate don't do also ok. Karate maybe do maybe not - get squished. So Access 97 syntax accept ok, Access 97 syntax reject also ok. Access 97 syntax sometimes accept sometimes reject - get squished (me that is). Any how, thanks for your time.

Posting Permissions

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