isnumeric compile error...

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

    #16
    Re: isnumeric compile error...

    MLH wrote:
    <Snip>
    >
    >>If I input incorrect data into the immediate window I'd expect an error.
    >Garbage in, garbage out. You entered in garbage and expected Access
    >>to fix it.
    >>
    >>You were using a literal value that was incorrectly entered. Then you
    >>complain about Access noting the error. Why?
    >
    >
    Again, point well taken. So, some program code dynamics are difficult
    to replicate in the debug window. Any recommendations as to how one
    might gracefully skirt around a user data entry error of 1.1.1 into a
    textbox control expecting a valid numeric entry?
    Yes, check for it's validity in the BeforeUpdate event.

    Entering IsNumeric(1.1.2 ) in Debug is different than entering 1.2.2 in a
    textbox. One is a literal, the other what I'd consider a variable. If
    bound to a numeric field you would get an error.

    If you are running all your functions and subs from debug then you need
    to enter in data correctly.

    Comment

    • MLH

      #17
      Re: isnumeric compile error...

      <snip>
      >Add the following lines to a function and try to compile, you will get an
      >error just like in the immediate window. So where is the glitch?
      >
      >If IsNumeric(1.2.2 ) Then
      >End If
      >
      >
      What you say is True. I didn't try that. Salad pointed out that
      literals are processed differently than variables. It all makes
      sense now. Thanks.

      Comment

      • MLH

        #18
        Re: isnumeric compile error...

        Thx, Salad. Makes perfect sense. The difference
        is clear. Somehow, it just went over my head.

        Comment

        Working...