Results 1 to 2 of 2
  1. #1
    Alovallo is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Feb 2012
    Posts
    1

    Query Null Exclusion Criteria + null result contingency help

    Hello,



    I am trying to use an access database to convert .xml files with a bunch of tables in them into a flat file with just one line of information to export to a real database. My plan is to use a bunch of queries (when there is more than one line) to pull data and then query the queries to get everything onto one master table.

    for one page of fuels there will always be one line for electricity, sometimes one line for natural gas, and sometimes one line for an additional fuel. when the natural gas or third fuel is not there then the query comes up blank which totally kills the master table.

    query one: criteria electricity
    query two: criteria natural gas ( but needs contingency for null)
    query three: not "electricity" and not "natural gas" (this needs a contingency display for null, and possibly a contingency for if there is not any type of third record in the table at all - does this count as null or something else?

    i have been trying to nest iif and isnull statements but cant get it to display a word if there is no match. Also am a little confused as to whether it is better to put the expression in the field or criteria boxes.

    I really appreciate any help either on the specific question or advice on the overall strategy.

    Sincerely,

    Alex

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,815
    If line is not in the source data, then query can't show something that isn't there. There is nothing for an expression to work with. If there is no record for gas or other, why is it a concern to show null? Don't understand how this 'kills' the master table. Show samples of source data and desired result.

    How do you plan to 'query the queries to get in one master table'?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Finding the Max Date and Null Values if Null
    By SpdRacerX in forum Queries
    Replies: 1
    Last Post: 02-03-2012, 06:29 AM
  2. Replies: 3
    Last Post: 01-15-2012, 11:05 PM
  3. Passing criteria "NULL" or "IS NOT NULL" to a query
    By SgtSaunders69 in forum Forms
    Replies: 1
    Last Post: 12-24-2011, 02:22 AM
  4. Replies: 12
    Last Post: 12-11-2011, 05:04 PM
  5. If Query result Is Null...MsgBox..Okl
    By Bruce in forum Forms
    Replies: 28
    Last Post: 03-10-2010, 10:57 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