Results 1 to 5 of 5
  1. #1
    Join Date
    Aug 2012
    Posts
    70

    Unanswered: How to I hide fields from a query?

    I am making a Query in Access 2007.

    I want to have certain fields included in the query but hidden from the output (after "Run" is selected). I want the fields selected so that I can filter the query by using the criteria of that field.


    When I uncheck the "Show" box in access, I run the query and the field doesn't show (which is good), however when I go back into design view, the fields have been removed.


    I read somewhere that the hidden fields go to the rightmost column of the design view, however they are not there. They have just been removed from my query

  2. #2
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    ?
    a query is the mechanism to retrieve data
    you can decide what items to show or not in your front end.

    when you apply a filter (effectively a where clause) the column doens't need to be in the select part.

    SQL has no concept of the 'rightmost' columns.
    the Query designer is, I suspect dropping the column becuase they are superfluous. They are not in the SELECT, not are they used in the WHERE to they are redundant and removed.

    Do youself a favour and stop using the query designer and instead write native SQL, change to SQL view from Query designer view.
    I'd rather be riding on the Tiger 800 or the Norton

  3. #3
    Join Date
    Aug 2012
    Posts
    70
    I would switch if I knew SQL, but I don't.


    So Access is just essentially condensing the file by removing unnecessary information (e.g. unused references such as the references to the unused fields). If I applied criteria to the non-shown fields, they would remain?


    I'm new to databases, sorry.

  4. #4
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    Access is a front end
    it uses SQL to manipulate the data
    the query browser writes SQL
    there is nothing that the query browser does that you writing SQL can't do
    often you can write better SQL than the query browser can
    I'd rather be riding on the Tiger 800 or the Norton

  5. #5
    Join Date
    Sep 2006
    Location
    Surrey, UK
    Posts
    995
    Provided Answers: 2
    So Access is just essentially condensing the file by removing unnecessary information (e.g. unused references such as the references to the unused fields). If I applied criteria to the non-shown fields, they would remain?
    Yes and yes.

    As healdem said, if a field is not selected for output, and not measured against a selection criterion, and not used to order records, it's of no use to the query. If you're not using certain fields for anything, why do you want to retain them in the query design?
    10% of magic is knowing something that no-one else does. The rest is misdirection.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •