Results 1 to 4 of 4
  1. #1
    New Lounger
    Join Date
    Feb 2003
    Location
    Toronto, Ontario, Canada
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Compile Error (Access XP)

    Hello all,

    1) I ran into a problem today in an mdb that has been working fine for the last week or so.

    2) I am trying to run a

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

    Re: Compile Error (Access XP)

    If you copied the error message literally, there is a problem with the Round function indeed, because it hasn't been changed to proper case.

    The first thing that comes to mind is a references problem, but you state explicitly that you have already checked this.

    Another possibility is a name conflict with something else in your database. Things to check:
    <UL><LI>A custom function named 'round'.
    <LI>A module named 'round'.
    <LI>The project name (Tools/... Properties in the Visual Basic Editor)[/list]You can also search for round in the Object Browser in the Visual Basic Editor. The only occurrence of Round (as a whole word) in my test database is as a method of VBA.Math.

  3. #3
    New Lounger
    Join Date
    Apr 2003
    Location
    Saratoga Springs, New York, USA
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Compile Error (Access XP)

    I double-checked the Access 2000 help and Round( ) is a legitimate function. The only argument it requires is a numeric expression.

    My guess is that somewhere in your data there is now some "funky" data in the field [tblHRTrend]![FTE] - like a NULL value. I have recently worked through some similar problems with a custom function I had written. It "stopped working" due to changes in the underlying data that were not there when I first created the function three years ago.

    I am also curious about the format of your reference to the field within the Round function. I would have thought that Access would have inserted the square brackets around both the table name and the field name with a period as the delimiter. Since this already worked, I guess it's not an issue. But I would double-check how you are referring to that field within the query and maybe consider changing to the other type of qualifying syntax.

    Just some thoughts.

    Peter

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

    Re: Compile Error (Access XP)

    If you are referring to a table field, get rid of the bang (!) and replace it with a dot (.) because in queries, bangs refer to form or report members while dots indicate fields.
    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
  •