Results 1 to 5 of 5
  1. #1
    Join Date
    Aug 2009
    Posts
    2

    Question Unanswered: Ms Access Archieve

    Can I used Hide/unhide field in a report criteria, like ms access 2007 used in ythe student database. I want a user to select from a box containing fields, let say 10 fields, i want the user to select the fields that they want to see on the report. I have already made reports for all combinations of the fields.

  2. #2
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    yup
    place some code in the report detail/group/footer/whatever format event to make wahtever controls to be visible or not depending on whatever criteria you need
    I'd rather be riding on the Tiger 800 or the Norton

  3. #3
    Join Date
    Aug 2009
    Posts
    2
    Could you explain to me how to do this? Thank on advanced

  4. #4
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    10 fields, i want the user to select the fields that they want to see on the report. I have already made reports for all combinations of the fields.
    Really? How many reports are there?? Just curious.
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!


    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

  5. #5
    Join Date
    Dec 2004
    Location
    Madison, WI
    Posts
    3,926
    "I have already made reports for all combinations of the fields."
    (reportSSSS??)

    You could probably just make one report, arrange all the fields, and then like ST stated, put some code in the report detail/group/footer (ie. right-click on that area on the report, select the OnFormat property dropdown, select [Event Procedure], then click the ... to the right (this will take you to the coding screen for that event - typically it's the OnFormat event for the Detail section), and then add your code to make the fields visible or invisible (ie. me.MyFieldName.Visible = true or me.MyFieldName.visible = false). Of course, you'll also need to code in your logic as well (however you decide to do it.) We can't give you advice on this unless you can tell us how you have your criteria form (or method) setup to designate which fields you want to make visible or not. There are several ways to do this and it can get complicated depending on the number of fields and type of logic you want to use.

    Otherwise, if you've created separate reports for the different combinations of fields being visible or not, you'll then need to put the coding logic on which report to open somewhere in a button on the form where the user selects what fields to be visible or not. (again, not sure without more info on how you're doing this.)
    Last edited by pkstormy; 08-19-09 at 22:42.
    Expert Database Programming
    MSAccess since 1.0, SQL Server since 6.5, Visual Basic (5.0, 6.0)

Posting Permissions

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