Results 1 to 5 of 5
  1. #1
    SCFM is offline Novice
    Windows XP Access 2010 (version 14.0)
    Join Date
    Feb 2010
    Posts
    13

    Hide or Unhide Fields in Query using VB


    Is it possible, using VB, to create a show/hide control for a query similar to its show box?. This query will be exported to Excel, so, a Form control is not a solution. Thanks.

  2. #2
    Stressed is offline Novice
    Windows XP Access 2003
    Join Date
    Mar 2010
    Posts
    19
    Not sure what you are trying to do.

    Can you provide some examples/code?

  3. #3
    SCFM is offline Novice
    Windows XP Access 2010 (version 14.0)
    Join Date
    Feb 2010
    Posts
    13
    Thanks for your answer. I have a query with not few fields. Often I need to export part of those fields to Excel. I though to do it from Access but the only way I found to do it is to send the whole query to Excel and use VB to hide/unhide the fields.

  4. #4
    Stressed is offline Novice
    Windows XP Access 2003
    Join Date
    Mar 2010
    Posts
    19
    Quote Originally Posted by SCFM View Post
    Thanks for your answer. I have a query with not few fields. Often I need to export part of those fields to Excel. I though to do it from Access but the only way I found to do it is to send the whole query to Excel and use VB to hide/unhide the fields.

    Oh ok. The best way for you to do this then is to make another query based on your original query but only include the fields that you want to export.

    This way you can customize the query that you want.

    To do this, create a new query in Design Mode, select the Query Tab and pick the query that you are working with. Then select all the fields that you want.

  5. #5
    SCFM is offline Novice
    Windows XP Access 2010 (version 14.0)
    Join Date
    Feb 2010
    Posts
    13
    Quote Originally Posted by Stressed View Post
    Oh ok. The best way for you to do this then is to make another query based on your original query but only include the fields that you want to export.

    This way you can customize the query that you want.

    To do this, create a new query in Design Mode, select the Query Tab and pick the query that you are working with. Then select all the fields that you want.
    Thank you, but I was thinking in a control on a unique query. Using your solution I surely will need about tenths of customized queries to solve my problem (I need to select between 6 or 8 possible fields in a 10 columns query).

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

Similar Threads

  1. How can I hide/unhide DB window with a single button?
    By aquaraider in forum Programming
    Replies: 2
    Last Post: 10-09-2009, 07:01 AM
  2. Cannot hide fields in a datasheet
    By desgordon in forum Forms
    Replies: 2
    Last Post: 08-19-2009, 03:24 PM
  3. Replies: 6
    Last Post: 06-03-2009, 02:01 PM
  4. Hide/UnHide forms
    By access in forum Forms
    Replies: 3
    Last Post: 06-03-2009, 07:48 AM
  5. how to hide the fields in subform
    By tinytree in forum Forms
    Replies: 3
    Last Post: 05-01-2009, 07: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