Results 1 to 4 of 4
  1. #1
    TheJosephC is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jul 2014
    Posts
    2

    How to have certain fields show/not show in a query depending on another field parameter

    Hi all,



    I'm very new to Access but I'm ready to dive in.

    Let me explain what I'm trying to do: I perform inspections of bicycle tires and need to report results from the inspections. Some bike tires need a bunch of parameters checked that others don't -- all the testing depends on the size and manufacturer. Because of the huge number of tires I get in, I want to create an access databases that will output a report telling me what tests I need to perform for the tire size and manufacturer. I also want the report to include the target values of my tire tests.

    What I don't know how to do (at the moment) is the following:
    1). How do I have fields show/not show in a query depending on another field parameter. E.g. if I'm testing a tire with a specific manufacturer and size I might not need to test tire pressure. However, another size and manufacturer I might. How do I make it show/not show depending if it has a value or not?

    2). If I have tires that all start with CBxxxx (xxxx could be any length and letters/numbers), they all have the same shore durometer. Is there a way I can have access automatically display that durometer number in my report without adding thousands of CBxxxx products?

    3). If a manufacturer removes a required test, I want to be able to easily remove that test from a "list", not update every tire that is produced from that manufacturer in a table. There could be thousands of tires and this would cause me a lot of trouble if I need to go through thousands of tires manually and remove a test from all of them.

    Can you point me in the right direction with these questions? I really apologize for the lack of knowledge but we all started somewhere.

    Thanks for the help!

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,915
    So you need to build tables that define the association of tires and tests. I envision 3 tables at minimum.

    tblTires

    tblTests

    tblTireTests

    A report would use as RecordSource a query that includes all three tables. Run report filtered to the desired tire.

    Dynamically displaying test specifications for groups/classes of tires would be tricky but doable.


    Now the question is do you want to store data for inspected tires?


    Review http://www.rogersaccesslibrary.com/
    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.

  3. #3
    TheJosephC is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jul 2014
    Posts
    2
    Thank you very much June7. Can you please explain what would be stored in tblTireTests as you outlined above? What do I need to research to learn how to dynamically display test specifications (as you mentioned above)?

  4. #4
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,915
    Did you review the tutorials in the referenced link? You need an understanding of relational database principles. That site is one of many that can help. Or get an introductory book.

    tblTireTests would have records that associate tires and tests. Fields in the table would be at a minimum TireID and TestID. These would be foreign keys holding the primary key values from the other 2 tables.

    As for the specifications, I don't think you are ready to get into that aspect.
    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. Replies: 4
    Last Post: 04-03-2014, 08:03 AM
  2. Show Not Null Fields in one Field
    By Njliven in forum Queries
    Replies: 6
    Last Post: 08-14-2013, 09:25 AM
  3. Replies: 1
    Last Post: 05-03-2012, 04:59 AM
  4. Replies: 1
    Last Post: 11-23-2011, 10:51 AM
  5. show subform depending on combobox
    By d_Rana_b in forum Programming
    Replies: 2
    Last Post: 03-15-2011, 05: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