Results 1 to 5 of 5
  1. #1
    senna is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jan 2011
    Posts
    7

    Dont show null fields in report

    HELLO ALL,

    I HAVE A TABLE AND QUERY CONTAINING MANY FIELDS.


    THESE FIELDS IN SOME CASES HAVE A VALUE, AND IN OTHER CASES DO NOT. EG:


    PROJECT No. REFERENCE PART1 QUANTITY1 VALUE1 DESCRIPTION1 PART2 QUANTITY2 VALUE2 DESCRIPTION2

    THE CRITERIA IS BASED ON THE PROJECT NUMBER. AND THE DETAIL BASED ON THE REFERENCE NUMBER

    I NEED THE REPORT TO ONLY SHOW VALUES THAT ARE NOT NULL.
    SO FOR MY PROJECT NUMBER I WILL HAVE VARIOUS REFERENCE NUMBERS, WHICH CONTAIN 0 - 20 PARTS (DETAIL).
    EACH OF THESE PARTS HAVE A PART NUMBER, QUANTITY, VALUE AND DESCRIPTION.
    MY TABLE CONTAINS ALL THE FIELDS FOR THE PARTS THAT MAY BE RELATED TO THE REFERENCE NUMBER.
    TABLE NAMES ARE AS PER TOP EXAMPLE, EXCEPT CONTINUE UP TO 20.

    IS THERE ANY WAY TO DISPLAY IN THE REPORT ONLY THE VALUES THAT ARENT ZERO?

    I TRIED >0 IN THE QTY FIELDS (0-20) BUT IT ONLY DISPLAYS THE 1 REFERENCE WHICH HAS 20 PARTS ALLOCATED TO IT, ALL THE REST DO NOT SHOW UP BECAUSE THEY HAVE LESS THAN 20 PARTS ALLOCATED.

    I AM STUCKKKKKKK.

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    For starters, your caps lock key appears to be broken.

    Your design is flawed. You should not have the repetitive fields in the table. The normalized design would have a related table with fields for PART, QUANTITY, VALUE, DESCRIPTION. If a project had 3 parts, there would be 3 records in this table. You should read up on normalization, here for instance:

    http://r937.com/relational.html
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    senna is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jan 2011
    Posts
    7
    Thanks Paul. Caps lock is fine, cant believe people get offended by CAPS. It just happened to be on so I kept typing.
    Anyway, the design is based on data i receive in excel format. The reason behind this post is to avoid the previously monotonous and time consuming task of sorting the data into the simple 4-5 columns.
    The data i receive is over 30 columns wide, hence why made fields for each of these values even though they are the same TYPE of value.

    I want to copy and paste the data into the table as it is...All I want to know, is if it is possible to have my desired outcome through either modifying the report or query to suit. rearanging the table would simply put me back to step 1 and having to manipulate data which can lead to errors occuring.

    Appreciate the reply all the same.

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    I would still work with properly normalized data. You could pull the data from your Excel format into normalized format with a fairly simple UNION query, either to store it properly or at least for reporting. In any case, you might be able to use the Can Shrink/Can Grow properties of the report textboxes to get the look you're after.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  5. #5
    ssanfu is offline Master of Nothing
    Windows 2K Access 2000
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    Quote Originally Posted by senna View Post
    Thanks Paul. Caps lock is fine, cant believe people get offended by CAPS. <snip>
    Senna,

    I'm sure Paul knew that your caps lock was fine. But it was a polite way of saying "Please don't shout". After all, he *did* add a wink...
    Typing in all caps is akin to shouting. How would you like to have someone ask for help by SHOUTING at you??

    OK, back to your problem.. I also think you would be better off in the long run normalizing your table structure. You will probably spend more time fixing forms/reports in the future than fixing the structure now. If the Union query solution doesn't work for you, you could import the data using code to read in the data (from Excel SS or a csv file) and put it in the correct fields.

    (I had data coming in that was in an Excel SS: 32 columns wide; using code, I broke it up and put it in 7 related tables.)


    Because all of the parts as in one record, if one part has a quantity, then you get all parts. You might use code to loop thru each record, checking each part quantity, writing it to a temp table if QTY>0, then using the temp table for the report (one record per part).

    I don't know of a way just using a query.. Sorry

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

Similar Threads

  1. Combine two fields, Null fields involved
    By yes sir in forum Access
    Replies: 9
    Last Post: 10-03-2010, 09:20 AM
  2. Replies: 5
    Last Post: 03-20-2010, 08:30 AM
  3. Calculating null fields in a form
    By chu3w in forum Forms
    Replies: 1
    Last Post: 02-26-2010, 02:00 PM
  4. Oat-so-simple but i dont have a clue
    By turbo910 in forum Forms
    Replies: 13
    Last Post: 11-26-2009, 12:28 PM
  5. Criteria from Combobox dont work.
    By Ryan in forum Queries
    Replies: 3
    Last Post: 08-31-2009, 07:09 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