Page 1 of 2 12 LastLast
Results 1 to 15 of 23
  1. #1
    chriswrcg is offline Competent Performer
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2018
    Location
    Philippines
    Posts
    142

    How to build a dynamic filtering report?

    I built my first report and had it looking pretty good. Here is an example below.
    Click image for larger version. 

Name:	25.JPG 
Views:	41 
Size:	81.3 KB 
ID:	35918
    His was the only data in the system so I thought I would add someone else in and test everything. Everything looked good up to the report. When the new data went in the report just added them in and now both individuals are in it. This makes total since this would happen and I kind of expected it. I hoped it wouldn't but thought it might.
    Click image for larger version. 

Name:	26.JPG 
Views:	40 
Size:	186.3 KB 
ID:	35919


    How can I filter through employees and dates so that the report only displays one individual and date at a time? Is there something I can do with this one to get it to do that or will I have to start over and design another kind of report?

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,926
    Options to open report filtered to single employee and date:

    1. dynamic parameterized query

    2. apply filter criteria in: DoCmd.OpenReport "reportname", , , "EmpID=" & Me.tbxEmp & " AND WorkDate=#" & Me.tbxDate & "#". Review http://allenbrowne.com/ser-62.html

    Both options should reference controls on form for the EmpID and date values.

    If you want to show multiple employees and/or dates, use report Sorting & Grouping features.
    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.

  3. #3
    GinaWhipp's Avatar
    GinaWhipp is offline Competent Performer
    Windows 7 64bit Access 2013 32bit
    Join Date
    Jul 2011
    Location
    Ohio, USA
    Posts
    377

  4. #4
    chriswrcg is offline Competent Performer
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2018
    Location
    Philippines
    Posts
    142
    I am at a complete loss. I have read all the articles you guys have suggested and looked online for videos and tutorials on how to create a dynamic report but nothing I try works. The easiest way is to combine all the fields I need into one query and then create a search form that will allow me to filter the data and see what I want to see. I can then create a report based on the filtered data. The problem is that I have so many queries and fields I need for the report that when I try and combine them into one query I get the query is to complex error message.
    I have tried combining queries and removing queries but I keep getting the same message. At this point I don't think it is possible to have all the data I need and print a report in access.

  5. #5
    GinaWhipp's Avatar
    GinaWhipp is offline Competent Performer
    Windows 7 64bit Access 2013 32bit
    Join Date
    Jul 2011
    Location
    Ohio, USA
    Posts
    377
    Hmm, let's start with the report. Is the report you posted in your first post one report or more?

  6. #6
    chriswrcg is offline Competent Performer
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2018
    Location
    Philippines
    Posts
    142
    A Frankenstein's monster of sub reports to build the report I need. When I tried to combine queries i got error message after error message. I know this is not going to work for what I need but right now I cant get everything I need on one query.
    Click image for larger version. 

Name:	30.JPG 
Views:	32 
Size:	173.1 KB 
ID:	35926This give me this.Click image for larger version. 

Name:	25.JPG 
Views:	33 
Size:	81.3 KB 
ID:	35927

    Click image for larger version. 

Name:	236.JPG 
Views:	33 
Size:	47.2 KB 
ID:	35928

  7. #7
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,926
    If you want to provide db for analysis, we might be able to advise alternative. However, it just might be what you have is the best approach.
    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.

  8. #8
    chriswrcg is offline Competent Performer
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2018
    Location
    Philippines
    Posts
    142
    Here you go. It is still rough but is coming along. If I could just lick this report mess.
    Attached Files Attached Files

  9. #9
    GinaWhipp's Avatar
    GinaWhipp is offline Competent Performer
    Windows 7 64bit Access 2013 32bit
    Join Date
    Jul 2011
    Location
    Ohio, USA
    Posts
    377
    chriswrcg

    Okay, you should not have jumped to reports because I see the Tables are still not right. I have made a mock up of what they look like they should be...
    Click image for larger version. 

Name:	kkms4.png 
Views:	31 
Size:	59.6 KB 
ID:	35933

    I also can't seem to find what you said tried and failed. The only Form for filtering the report I see is SearchF and that has no code behind it and a button that opens a query. Am I missing something?

  10. #10
    chriswrcg is offline Competent Performer
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2018
    Location
    Philippines
    Posts
    142
    I found this and was able to follow along and create what he did. I tried to apply it to a report I will be needing with limited success.

    https://www.youtube.com/watch?v=CTiA_4Me0cI.

    I am abandoning the attempt

  11. #11
    chriswrcg is offline Competent Performer
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2018
    Location
    Philippines
    Posts
    142
    Here is the updated Relationship Chart.
    Click image for larger version. 

Name:	31.JPG 
Views:	27 
Size:	59.3 KB 
ID:	35941

  12. #12
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,428
    Not necessarily connected to your problem, but you also have two lookup fields

    TaskExceptions>ExceptionCode
    TaskActivities>TaskStandard

    The first links to ExceptionList per the relationships
    The second links to TaskList, same as TaskListID in the relationships

    You may need both but since TaskListID is not populated I question whether this is correct.

    I would remove the lookups so you can see what you actually have, and then I would rename these fields with a more accurate name to reflect the actual contents (i.e. ExceptionID, TaskListID). If you are concerned about having to manually change label captions to something more user friendly, use the field caption property.

    Other things - put an index, no duplicates against TaskCode in TaskList to prevent accidentally entering the same code twice. There may be other fields where this would be of benefit

    Bit concerned about your workdays table. What if someone clocks out then in again after visiting the dentist? Or similar scenarios, what if they take more than two breaks?

  13. #13
    GinaWhipp's Avatar
    GinaWhipp is offline Competent Performer
    Windows 7 64bit Access 2013 32bit
    Join Date
    Jul 2011
    Location
    Ohio, USA
    Posts
    377
    @chriswcg

    I am sorry to hear you are abandoning this.. Let me just say, I know you are probably getting frustrated, building relational databases is hard... Access is hard in the beginning (not a one and done kind of situation). And even those of us who have been doing it for years get that way from time to time but if you stick with it it WILL get easier.

    Now, I see you posted the Relationships, does that mean you had coffee and decided to give it another shot?

  14. #14
    chriswrcg is offline Competent Performer
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2018
    Location
    Philippines
    Posts
    142
    i meant i was abandoning the search form for now untill i get everything else straight. After this I need to work on my query's.

  15. #15
    chriswrcg is offline Competent Performer
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2018
    Location
    Philippines
    Posts
    142
    Not necessarily connected to your problem, but you also have two lookup fields

    TaskExceptions>ExceptionCode
    TaskActivities>TaskStandard

    The first links to ExceptionList per the relationships
    The second links to TaskList, same as TaskListID in the relationships

    You may need both but since TaskListID is not populated I question whether this is correct.
    I have two lookup tables one for task list and one for exception list. right now I am only using them to populate my drop down lookup fields on my data entry form.

    Other things - put an index, no duplicates against TaskCode in TaskList to prevent accidentally entering the same code twice. There may be other fields where this would be of benefit
    I am not really sure what you need me to do with this. Isn't a lookup table by default an index?

    Bit concerned about your workdays table. What if someone clocks out then in again after visiting the dentist? Or similar scenarios, what if they take more than two breaks?
    In those situations the time away form the job would be handled as exceptions and the time removed in that way. As long as we know how long the associate was away from the work and during what task the exception happened in then we can remove the time.

Page 1 of 2 12 LastLast
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Filtering Dynamic Combo Boxes
    By Topflite66 in forum Forms
    Replies: 62
    Last Post: 10-23-2017, 07:24 AM
  2. Trying to build a dynamic splash page
    By ZeroWard in forum Access
    Replies: 2
    Last Post: 01-21-2016, 07:32 AM
  3. Dynamic Filtering on Forms
    By tonygg in forum Forms
    Replies: 3
    Last Post: 11-11-2015, 02:56 PM
  4. Replies: 3
    Last Post: 09-22-2013, 11:29 AM
  5. Build a DYnamic Continuous Form
    By Rawb in forum Forms
    Replies: 4
    Last Post: 08-20-2012, 03:21 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