Weird Compile Error

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Kathy Houtami

    Weird Compile Error

    Hi there

    I've been encountered with weird compile error using Access 97.

    The error message is "Member or data member is not found" and it
    highlighted a line of code that has not be changed and has been
    compiled with no error for days.

    The code was Me.CircuitQuali fier.Requery

    It will only compiled if I changed the code to
    Me![CircuitQualifie r].Requery

    This problem happened to several of my programs. Usually what I do, is
    just to leave the program un-compiled and try to compile it again the
    next day. In 9 out of 10, it will compile fine without changing the
    code at all.

    Does anybody know what cause this error?
  • Wayne Morgan

    #2
    Re: Weird Compile Error

    You're right this is weird. You may have some corruption developing. Try
    decompiling or importing everything into a new mdb file and see if it will
    behave. Also, you may have a problem with duplicate names, although why this
    would work one time and not the next, I don't know. The duplicate names I'm
    referring to are if the control has the same name it as the field it is
    bound to.

    Example:
    Field Name: CircuitQualifie r
    Textbox Name: CircuitQualifie r

    Try changing the textbox name to txtCircuitQuali fier. Of course, this will
    require changing all instances of code that refer to the old name whether in
    VBA, queries, or the control source of calculated controls.

    Information on decompiling.


    --
    Wayne Morgan
    Microsoft Access MVP


    "Kathy Houtami" <kathy_houtami@ hotmail.com> wrote in message
    news:55f0be9e.0 402021651.b3f38 1@posting.googl e.com...[color=blue]
    > Hi there
    >
    > I've been encountered with weird compile error using Access 97.
    >
    > The error message is "Member or data member is not found" and it
    > highlighted a line of code that has not be changed and has been
    > compiled with no error for days.
    >
    > The code was Me.CircuitQuali fier.Requery
    >
    > It will only compiled if I changed the code to
    > Me![CircuitQualifie r].Requery
    >
    > This problem happened to several of my programs. Usually what I do, is
    > just to leave the program un-compiled and try to compile it again the
    > next day. In 9 out of 10, it will compile fine without changing the
    > code at all.
    >
    > Does anybody know what cause this error?[/color]


    Comment

    • Tony Toews

      #3
      Re: Weird Compile Error

      kathy_houtami@h otmail.com (Kathy Houtami) wrote:
      [color=blue]
      >I've been encountered with weird compile error using Access 97.
      >
      >The error message is "Member or data member is not found" and it
      >highlighted a line of code that has not be changed and has been
      >compiled with no error for days.[/color]

      I've seen this occasionally as well. It seems that sometimes Access thinks a form is
      a report. When I do the . thing for Intellisense up comes only report methods
      which is rather bizarre in a form.

      But usually a decompile fixes that. This is in A97 with an MDB with about 450 forms
      and 350 reports. See decompile or how to reduce Microsoft Access MDB/MDE size and
      decrease start-up times http://www.granite.ab.ca/access/decompile.htm

      Tony
      --
      Tony Toews, Microsoft Access MVP
      Please respond only in the newsgroups so that others can
      read the entire thread of messages.
      Microsoft Access Links, Hints, Tips & Accounting Systems at

      Comment

      Working...