Page 3 of 4 FirstFirst 1234 LastLast
Results 31 to 45 of 53
  1. #31
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929

    Which link - Allen Browne?

    You won't learn if you don't try. Exactly what do you not understand? How to build dynamic parameterized query? Use the query designer. How to have dynamic parameters reference textbox? Again, the query designer can guide you.

    What do you not understand about the instructions in post 23 (the one with an image of report design) and post 25?
    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.

  2. #32
    bradp1979 is offline Competent Performer
    Windows 7 64bit Access 2007
    Join Date
    Jul 2015
    Location
    San Francisco, CA
    Posts
    234
    What I didn't understand about post 23 is that, on the surface, it looks like the report I had already created. I wasn't sure what needed to be changed there.

    Post 25, I tried to insert that code into the Go command, but I am getting a missing parameter of "ShiftDate"

  3. #33
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    It is different because:

    1. the RecordSource is not an aggregate query

    2. the report has a grouping on EmployeeID - see the black bar that says "EmployeeID Header"

    3. the aggregate calc is achieved by expression in textbox - see the CountOfYes label and the textbox below it

    The code won't work on report as you designed it.
    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.

  4. #34
    bradp1979 is offline Competent Performer
    Windows 7 64bit Access 2007
    Join Date
    Jul 2015
    Location
    San Francisco, CA
    Posts
    234
    On the report imaged in post 23, did you simply rename the header to "EmployeeID Header," or is there something else I have to do to make it correct?

    I know I'm asking a bunch of ignorant questions, I appreciate your patience. As should be completely obvious, I am no developer; I am simply the most technically-minded person in the office, so I got thrown into the "Database manager" position, regardless of my lack of knowledge.

  5. #35
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    I had to create the EmployeeID group. Your report did not have grouping set up.

    If you are using Access 2007, then the image I posted showing the Sorting & Grouping interface at the bottom is not applicable. Review https://support.office.com/en-us/art...6-C63CDDB2C7F9

    If you want to use the dynamic parameterized aggregate query instead, then open the aggregate query object and edit it as described in post 23, except that [enter start date] and [enter end date] will instead reference controls on form.

    Then your original code to open report should be good enough.
    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.

  6. #36
    bradp1979 is offline Competent Performer
    Windows 7 64bit Access 2007
    Join Date
    Jul 2015
    Location
    San Francisco, CA
    Posts
    234
    I set up the EmployeeID group, but now mine looks like this:
    Click image for larger version. 

Name:	MVR.png 
Views:	5 
Size:	50.1 KB 
ID:	21904

  7. #37
    bradp1979 is offline Competent Performer
    Windows 7 64bit Access 2007
    Join Date
    Jul 2015
    Location
    San Francisco, CA
    Posts
    234
    Grr. I've created a report that has the Employee ID grouping using the form wizard, but it is not even close to being correct. It's showing every single employee, and a # in the MVR column. That and the layout is very screwy. It's got the info from tblEmployee on one line, and the info from tblRelEventEmployee on another. so everything looks scattered and skewed.

    Is what I'm hoping for even possible? A report that is rendered that would look something like this:

    MVR count for August 1-31, 2015

    Employee ID First Name Last Name MVR

    __651________Bob______Roberts_____6
    _1865________Bill ______Williams ___5
    __845 ________Jill_______Bean______3

  8. #38
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    As shown in my posted image, the data controls are moved into the group Header section, not the report Detail section.
    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.

  9. #39
    bradp1979 is offline Competent Performer
    Windows 7 64bit Access 2007
    Join Date
    Jul 2015
    Location
    San Francisco, CA
    Posts
    234
    Right. That's what I tried to do. This is what I've got.
    Click image for larger version. 

Name:	MVR.png 
Views:	5 
Size:	86.9 KB 
ID:	21905

  10. #40
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    ALL data controls in the group Header - except ShiftDate as I did not include that in my example because I did not think you cared about raw data details, only the aggregate calc.
    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.

  11. #41
    bradp1979 is offline Competent Performer
    Windows 7 64bit Access 2007
    Join Date
    Jul 2015
    Location
    San Francisco, CA
    Posts
    234
    I do only care about the aggregate calc, but I thought since I want it to pull the report based on the date, ShiftDate would be necessary.

  12. #42
    bradp1979 is offline Competent Performer
    Windows 7 64bit Access 2007
    Join Date
    Jul 2015
    Location
    San Francisco, CA
    Posts
    234
    Ok, so I got all data controls in the group header:
    Click image for larger version. 

Name:	MVR.png 
Views:	5 
Size:	20.3 KB 
ID:	21906


    However, when I switch to design view, I get this:
    Click image for larger version. 

Name:	MVR2.png 
Views:	5 
Size:	22.7 KB 
ID:	21907
    None of those people have a "Yes" in their "MVR" column.

  13. #43
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Okay, is the report going to be filtered to a single ShiftDate value? If so, include that textbox in the group Header as well.

    And I am confused. Why does the Count() expression show "Yes" and not a number?

    Try Sum() instead of Count().

    What is the error the textbox has? Click on the little green triangle or the ! box.
    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.

  14. #44
    bradp1979 is offline Competent Performer
    Windows 7 64bit Access 2007
    Join Date
    Jul 2015
    Location
    San Francisco, CA
    Posts
    234
    I don't know if it's going to be filtered through a single shiftdate value. Each event, there is one employee who is selected as MVR. So I guess in order to make the count, it needs to see all events that fall within the date range, and count how many times each EmployeeID has "Yes" in the MVR column during that time.

  15. #45
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    So unless you want to see all ShiftDate values, don't include that field on the report.
    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.

Page 3 of 4 FirstFirst 1234 LastLast
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 5
    Last Post: 01-31-2015, 02:44 PM
  2. Create a "Totals" row for each column in crosstab
    By accessnewbie352 in forum Queries
    Replies: 13
    Last Post: 01-06-2015, 12:28 PM
  3. Replies: 3
    Last Post: 04-29-2014, 04:49 PM
  4. Column sum works in "Detail" but not "Footer"
    By Doodlebug2000 in forum Reports
    Replies: 1
    Last Post: 12-10-2012, 03:20 PM
  5. Export "Query or Report" to a "Delimited Text File"
    By hawzmolly in forum Import/Export Data
    Replies: 3
    Last Post: 08-31-2012, 08:00 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