Results 1 to 7 of 7
  1. #1
    2 Star Lounger
    Join Date
    Jan 2003
    Location
    Toledo, Ohio, USA
    Posts
    141
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Debug stepping missing statement that seems correc

    Post deleted by jp2558

  2. #2
    Lounger
    Join Date
    Dec 2000
    Location
    Ohio, USA
    Posts
    28
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Debug stepping missing statement that seems correc

    Hello,
    Have you tried to use ISNULL as in:
    --> If ISNULL(Me![CreditCardNumber]) Then
    Null has given me headaches but I always forget the workings of Null before the next use.
    Good Luck

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

    Re: Debug stepping missing statement that seems correc

    Dana's suggestion is a good one. You can't test for anything being equal to Null, because Null represents an absence of a value and the comparison will always return false. You have to use the IsNull function for that purpose.
    Charlotte

  4. #4
    2 Star Lounger
    Join Date
    Jan 2003
    Location
    Toledo, Ohio, USA
    Posts
    141
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Debug stepping missing statement that seems correc

    Thank You, Thank You, Thank You. This has fixed the problem and now the cursor goes where it should depending on the field in error. How did you (both Dana & Charlote) learn these things? Where can I find the suggested syntax for such statements so that I don't keep chasing my tail using what appears to be acceptable code?

  5. #5
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Edmonton, Alberta, Canada
    Posts
    326
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Debug stepping missing statement that seems correc

    I agree - remembering how to work with nulls takes some getting used to (although as I said in a previous message, explicit numeric nulls can be extremely useful in certain circumstances). It is documented in the online docs (although you might need some psychic talent to realize beforehand what you should be looking up [img]/w3timages/icons/smile.gif[/img]) - see "Comparison Operators" in the online docs.

    When you need to work with nulls, keep the function nz(...) in mind; very handy where you do want to treat null as zero (or any other chosen value) in a specific place in your code.

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

    Re: Debug stepping missing statement that seems correc

    Well, it helps when you start with Access 1.0 the day it's released and "grow up" with it as it evolves![img]/w3timages/icons/grin.gif[/img]
    Charlotte

  7. #7
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Brisbane, Queensland, Australia
    Posts
    352
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Debug stepping missing statement that seems correc

    The best place for finding things like that is the WOPR lounge. By trying to understand the questions asked and seeing the answers to them you learn a lot. And you may be able to help someone else too.
    David Grugeon
    Brisbane Australia

Posting Permissions

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