Results 1 to 7 of 7
  1. #1
    stevekos is offline Novice
    Windows 8 Access 2010 64bit
    Join Date
    Jun 2015
    Posts
    6

    Show/Hide malfunction in Query ??

    Hello all,

    I am fairly new to Access, and am still studying basic to intermediate level. I have come across an anomaly which is driving me crazy. I have a strange malfunction occuring in my queries. If I click to hide a field in a query it still shows up in the resulting query table when run, but the field is then totally hidden in the design view:

    The first image is the query which has the 'show/hide' box ticked in the query's 'PhoneNumber' field to 'hide', but it results in hiding the field in the design view, not the resulting query table.

    Click image for larger version. 

Name:	Query malfunction 2.jpg 
Views:	13 
Size:	121.2 KB 
ID:	21173Click image for larger version. 

Name:	Query malfunction 1.jpg 
Views:	13 
Size:	111.7 KB 
ID:	21172

    Any ideas what is going on here?

  2. #2
    CJ_London is offline VIP
    Windows 8 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,932
    I suspect you either have a phonenumber column way off to the right and off the screen or you have hidden the column in the query grid by reducing the width of the column to nothing.

    If you save and close the query and then reopen it in design view it should tidy up the grid.

    Also, if this does not solve the problem, suggest you go to the sql window and see what is there (You may have 'SELECT *, ...) which selects all columns, although I would then have expected to see duplicates of all the columns

  3. #3
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,862
    My vote is the Query Object is corrupt. I would copy the SQL from SQL View and paste it into notepad. Then, delete the Query Object, Compact and Repair the DB, and rebuild the Query Object.

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    Checking the box means to show the field. Unchecking means to not show. A field that is unchecked and has no filter criteria will be dropped from the grid.

    My vote is on * wildcard is still pulling the field into the query datasheet view. I just tested this and the fields are not duplicated. Look at SQL View and see if the * is used. The query builder will automatically use the * unless you set Access options to not do that.

    File > Options > Object Designers > Query Design > check/uncheck Output all fields

    So there is no malfunction, just preference settings and query syntax.
    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.

  5. #5
    stevekos is offline Novice
    Windows 8 Access 2010 64bit
    Join Date
    Jun 2015
    Posts
    6
    Thanks June7, sorry for the slow reply, I have been working on some other projects. Your solution seems to have fixed the problem. I will have to remember to uncheck that option in all my databases though. Can it be set as a default setup in all new databases?

  6. #6
    stevekos is offline Novice
    Windows 8 Access 2010 64bit
    Join Date
    Jun 2015
    Posts
    6
    Sorry for the double post. Unchecking the "output all fields" option on the database in question seems to have made it a default option on any new (or existing) databases. Thanks.
    Last edited by stevekos; 07-19-2015 at 06:33 AM. Reason: Typo

  7. #7
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    Yes, that is an application, not database, option setting.
    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: 1
    Last Post: 11-26-2014, 02:30 PM
  2. Hide Show Text Box
    By Derrick T. Davidson in forum Forms
    Replies: 3
    Last Post: 04-09-2013, 11:13 PM
  3. Show/Hide Form
    By sparlaman in forum Forms
    Replies: 5
    Last Post: 05-16-2011, 11:48 AM
  4. Search Combo box malfunction
    By babak.nourani in forum Forms
    Replies: 7
    Last Post: 01-20-2011, 07:37 PM
  5. Show/Hide Columns in a Query
    By SCFM in forum Access
    Replies: 1
    Last Post: 02-23-2010, 08:04 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