Results 1 to 3 of 3
  1. #1
    Nick Bygrave is offline Novice
    Windows 10 Access 2007
    Join Date
    Aug 2021
    Posts
    7

    Access Query: show or hide field based on another field value in the query


    In a query I have data destined for print out in a report of letters. There is a field called FormSigned(Yes or No) in the query. If set to Yes, I want to hide another text field in the query/letters. If set to No, I want to show that field in the query/letters.
    Could someone tell me how to set the query parameters, or tell me another way? Thanks
    Nick Bygrave

  2. #2
    Minty is offline VIP
    Windows 10 Office 365
    Join Date
    Sep 2017
    Location
    UK - Wiltshire
    Posts
    3,003
    You can't hide a field in a query. You can chose to display or not a value but not actually hide the column as with multiple records you wouldn't see the ones you wanted.
    You can easily hide a field in a report, the simple route is to use conditional formatting.
    DLookup Syntax and others http://access.mvps.org/access/general/gen0018.htm
    Please use the star below the post to say thanks if we have helped !
    ↓↓ It's down here ↓↓

  3. #3
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows 10 Access 2016
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,543
    AFAIK you can't hide a field like that in the actual query but you could create a calculated field which only returns a value if the value of FormSigned is No.
    In the report you could have a textbox control bound to the calculated field. The textbox can be set to allow it to shrink/expand as required to show the data therein.
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

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

Similar Threads

  1. Replies: 4
    Last Post: 06-27-2021, 08:56 PM
  2. Replies: 3
    Last Post: 01-04-2015, 03:00 PM
  3. Replies: 1
    Last Post: 11-26-2014, 02:30 PM
  4. Replies: 2
    Last Post: 02-20-2014, 06:51 PM
  5. Show/ hide image based on some field value
    By capitala in forum Reports
    Replies: 4
    Last Post: 04-06-2013, 10:56 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