Page 2 of 2 FirstFirst 12
Results 16 to 18 of 18
  1. #16
    John_G is offline VIP
    Windows XP Access 2003
    Join Date
    Oct 2011
    Location
    Ottawa, ON (area)
    Posts
    2,615
    There is a missing space before FROM, but I don't think that is the issue; I doubt if there really is a missing space.

    Beyond that, I see nothing in the query that could cause an "invalid use of Null" error, so it has to be in the calculated field in the table.

    Try replacing all Null values for [Qty] and [ReturnedQty] with zeros. In SQL, it would be:

    Update [Load Lists] set [Qty] = 0 where [Qty] is Null

    and



    Update [Load Lists] set [ReturnedQty] = 0 where [ReturnedQty] is Null


    Based on what you have shown, that should work.

    John

  2. #17
    wolfm is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Dec 2013
    Posts
    93
    Quote Originally Posted by John_G View Post
    There is a missing space before FROM, but I don't think that is the issue; I doubt if there really is a missing space.

    Beyond that, I see nothing in the query that could cause an "invalid use of Null" error, so it has to be in the calculated field in the table.

    Try replacing all Null values for [Qty] and [ReturnedQty] with zeros. In SQL, it would be:

    Update [Load Lists] set [Qty] = 0 where [Qty] is Null

    and

    Update [Load Lists] set [ReturnedQty] = 0 where [ReturnedQty] is Null


    Based on what you have shown, that should work.

    John
    I tried these updates, and still no luck. I'm thinking that perhaps some of my data is corrupted. I think my work-around is going to export my query to excel and use excel filters to remove the positive and zero value. Unfortunately, a few extra steps.

  3. #18
    John_G is offline VIP
    Windows XP Access 2003
    Join Date
    Oct 2011
    Location
    Ottawa, ON (area)
    Posts
    2,615
    Hi -

    I'm beginning to wonder if that "invalid use of null" error is even bing generated by the query. Are you getting that error if you run the query from query design view? Or, are you opening the query from VBA? If you are using VBA, then there is a chance (quite a good one, actually) that the error is coming from somewhere else in your code, after the line that opens the query.

    John

Page 2 of 2 FirstFirst 12
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 2
    Last Post: 12-21-2013, 11:37 AM
  2. Replies: 4
    Last Post: 05-17-2013, 04:00 PM
  3. Data type mismatch in criteria expression
    By buienxg in forum Access
    Replies: 2
    Last Post: 11-22-2011, 10:29 AM
  4. Data type mismatch in query criteria
    By TinaCa in forum Queries
    Replies: 2
    Last Post: 09-19-2011, 11:31 PM
  5. data type mismatch in criteria expression
    By broecher in forum Access
    Replies: 4
    Last Post: 09-10-2010, 08:29 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums