Results 1 to 4 of 4
  1. #1
    KrisDdb is offline Advanced Beginner
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2011
    Posts
    58

    Question Filter Access Report based on Checkbox selection

    I have a query that gives field values like name, age, department, etc for all the staff members in our company. These fields are obtained from many other tables and queries. Now I am planning to generate a report, which would display the results of this query. The catch is I am trying to do it in such a way that I want the user to have the option to select for which staff members he wants to run the report.
    Example: if I have 10 staff members, the user should be able to select staff3, staff6, staff7 and run the report such that it displays all the field values from the query related ONLY to these 3 staff members.
    I have this design in mind. I was thinking of using a form for this. I could put up some labels and checkboxes for each staff on the form, and then select some checkboxes and get the report to read which checkbox is selected, and then display the concerned results through the report. But I am not sure of how to go ahead with it. Also, I am not sure if this is the best method to do it. If anyone knows how to implement this, or if you know of a better/easier method, please let me know.
    Appreciate you time and thoughts.

  2. #2
    pbaldy's Avatar
    pbaldy is online now Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,530
    I'd probably use a multi-select listbox:

    http://www.baldyweb.com/multiselect.htm

    It would be more dynamic than check boxes, which would require you to modify the form every time you got a new employee.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    KrisDdb is offline Advanced Beginner
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2011
    Posts
    58
    Hi Paul

    Thanks for the quick reply.

    This method seems to be perfect for my situation. But I dont know where the trouble is, but my DB is crashing when ever I try to open it after I put the code for the form. When I open a backup without the form code, it opens properly! (So I believe theres no trouble with Access at least) Its kinda weird but thats what is happening
    I tried repair and compact.. It didnt help either. Any thoughts as to whats causing the trouble? And suggestions as to what I can do?

  4. #4
    pbaldy's Avatar
    pbaldy is online now Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,530
    Did you just copy/paste the code, or did you try to copy the actual objects from one db to the other? I've heard of corruption issues when trying to copy actual objects. I would just create your own objects and then copy the code over and adjust it for your names. Certainly at this point I'd start from another copy of your backup (which was smart of you to make).
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. Report Fields Visible Based on Checkbox
    By ghillie30 in forum Access
    Replies: 2
    Last Post: 09-21-2011, 09:04 AM
  2. Replies: 1
    Last Post: 09-06-2011, 01:47 PM
  3. Replies: 5
    Last Post: 10-06-2010, 07:28 PM
  4. Replies: 0
    Last Post: 08-24-2010, 06:38 PM
  5. Replies: 19
    Last Post: 05-12-2009, 02:59 PM

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