Results 1 to 5 of 5
  1. #1
    Join Date
    Dec 2005
    Posts
    17

    Unanswered: Runtime Error 424 - object required

    MS Access takes umbrage with the following piece of code, returning the runtime error 424:

    If Me.Analyze_Product Is Not Null Then
    DoCmd.OpenQuery "qu_count_product", acViewNormal

    It points to the If statement to indicate the problem is there. I'm not sure what's wrong with the statement--the Analyze_Product field is a valid field... The problem seems to be with the "Is Not Null" part. if I change it from Is Not Null to = "whatever" then it works fine. problem is, i want to run the query only if the field value is not null, and i can't seem to find a way to get that to work...
    Last edited by andyg75; 01-04-06 at 12:12.

  2. #2
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    what did the help system indicate was the correct syntax for the not null construct?

    just looking at it I'd expect to see somthing similar to
    If not isnull(Me.Analyze_Product) Then
    DoCmd.OpenQuery "qu_count_product", acViewNormal
    Endif

  3. #3
    Join Date
    Dec 2005
    Posts
    17
    the help system didn't suggest squat. it was vague at best... i'll try the formatting you suggest. thanks.

  4. #4
    Join Date
    Dec 2005
    Posts
    17
    Quote Originally Posted by healdem
    what did the help system indicate was the correct syntax for the not null construct?

    just looking at it I'd expect to see somthing similar to
    If not isnull(Me.Analyze_Product) Then
    DoCmd.OpenQuery "qu_count_product", acViewNormal
    Endif
    using this code doesn't product an error message. it runs the query whether the field is null or not.

  5. #5
    Join Date
    Jan 2006
    Posts
    3
    Sorry - noticed already answered

Posting Permissions

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