Results 1 to 5 of 5
  1. #1
    GCLIFTON is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    May 2016
    Posts
    84

    If NULL NOT SHOW FOR Multiple Columns (VBA)

    Need help. I have roughly 30 fields in a table. I want to in a query or in a report a vba that would do the following. I am not sure which way is best

    First in the Scope Column give me all that value that = 90. In which I know in the Query Design View is "90". Correct?

    but second,

    If any of the columns starting with Entry Door going to the right (Which is 30+) = Good show me that data but exclude any of the 30+ columns that does not have "Good" Meaning do not show.
    So for the example in a query once it has run the only columns that would show in the example below would be. Combine, Building Number, Unit Type, Verified, Status, Hand, Scope and Kitchen Floor for only 1936-2 and 1936-3.


    Click image for larger version. 

Name:	Ex_!.GIF 
Views:	25 
Size:	204.6 KB 
ID:	24919

  2. #2
    ssanfu is offline Master of Nothing
    Windows XP Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    It looks like your table design is what is known as "Committing Spreadsheet". Excel spreadsheets are short and wide. Access tables are tall and narrow.

    You have field names like "Entry Door", "Kitchen Cabinet", "Kitchen Counters", "Kitchen Sink", "Kitchen Faucet", "Kitchen Floor"; these are actually data.

    My first suggestion would be to normalize your table structure.

    Second option: You might look at the code at http://www.allenbrowne.com/ser-62code.html for building a criteria clause. You could use this technique to create a query (in code) and modify the SQL of the saved query.

  3. #3
    GCLIFTON is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    May 2016
    Posts
    84
    Not understanding when you say Normalize the table Structure. This table is create from a form that has each column. Per what you select it fills out the table that you see. From this data i am running queries and reports.

    and i will go deeper in the second option as well. Question, per my statement i just mention would the Second option still apply.

  4. #4
    orange's Avatar
    orange is offline Moderator
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,726

  5. #5
    GCLIFTON is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    May 2016
    Posts
    84
    Normalization yes. This data was a test in which you are correct and picked up that was from and excel file that was not completely fill out. Currently i have a form that files out each cell in the database sheet. It is set that you can not go to the next without applying something to the previous. I now know this process of doing things in Access is call Normalization. Thank you for that information and also thanks for Access Functions, between the documents i can see how it can make a lot things easier.

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

Similar Threads

  1. Replies: 5
    Last Post: 03-08-2016, 07:25 AM
  2. Replies: 4
    Last Post: 06-09-2014, 06:31 AM
  3. A - B = C, show all 3 columns ?
    By SpookiePower in forum Queries
    Replies: 6
    Last Post: 12-23-2013, 02:21 PM
  4. IF ID Is not Null show TYPE from other table
    By superjeff in forum Access
    Replies: 5
    Last Post: 09-14-2012, 09:45 PM
  5. Do not show null records
    By brobb56 in forum Forms
    Replies: 1
    Last Post: 09-23-2011, 02:29 PM

Tags for this Thread

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