Page 2 of 2 FirstFirst 12
Results 16 to 23 of 23
  1. #16
    VAer is offline Competent Performer
    Windows 10 Access 2013 32bit
    Join Date
    Sep 2016
    Location
    USA
    Posts
    163
    Quote Originally Posted by isladogs View Post
    Then I suggest you make time. You cannot expect any of us unpaid volunteers to give up our time giving you a solution when you aren't prepared to make the effort yourself.
    Good luck with your problem. I will drop out now
    No, that is not what I mean. At this point, I am asking for general idea about if it works in Access. Just like asking for someone to point me to right direction. Just making sure I am in the right direction. For sure, I will explore more. So far, this thread's question is more about: I want to do something(output table), is it possible to do it in Access crosstab or somewhere? I am not asking for detailed code. For example, if someone has experience with Access crosstab, he/she may tell me if it is possible to make certain date range in crosstab, at least I have a general idea of what can be expected. It is not like I am not thinking, I have spent time on thinking about dummy username, based on the comments. I was posting the "dummy username" idea during midnight (US Eastern time). If the idea may work, I will explore more; if someone tells me it is not possible, then I can give up and look into other alternative. This is not the only issue I have, at the meanwhile, I spend most of time on front end app features.

    At least, from this thread, I learn the term "crosstab", and so far I know it is crosstab related issue. Otherwise, I don't even know where to begin searching. Before it, I used the term "partial transpose" to describe my issue.

    But thank you. I will explore more before asking more questions.

  2. #17
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,902
    We have given you 'general idea' with the referenced links.

    Displaying date with day name is a format setting. Forcing it to display in CROSSTAB column headers requires using Format() function. CROSSTAB column headers display in alphabetical order unless otherwise specified with IN() clause. And to better understand, review tutorials.
    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. #18
    VAer is offline Competent Performer
    Windows 10 Access 2013 32bit
    Join Date
    Sep 2016
    Location
    USA
    Posts
    163
    Many online examples displaying crosstab value by math calculation, I don't think it applies to my case, not sure which one to choose, it always returns error. For Crosstab Value, it is actually WorkNote.Note, which is string (short text). I have changed numeric field Hours to string field Note.

    Need to watch some youtube demo videos.
    Attached Thumbnails Attached Thumbnails Crosstab.jpg  

  4. #19
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,974
    I'll drop back in briefly. Change Expression to First in the Total row for the Note field.
    Also remove the direct link between the Employee and Teams table. Its superfluous and having two sets of links may cause problems.
    Colin, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I don't know, I keep quiet!
    If I don't know that I don't know, I don't know whether to answer

  5. #20
    VAer is offline Competent Performer
    Windows 10 Access 2013 32bit
    Join Date
    Sep 2016
    Location
    USA
    Posts
    163
    Quote Originally Posted by isladogs View Post
    I'll drop back in briefly. Change Expression to First in the Total row for the Note field.
    Also remove the direct link between the Employee and Teams table. Its superfluous and having two sets of links may cause problems.
    Thank you, get a step closer. Date format error.

    Now I have a question, since TeamName is dynamic, depends on front end combo box value. Should I just replace (Teams.TeamName)="team1" with (Teams.TeamName)=comboBoxTeam.Text ? Then run the TRANSFORM statement in visual studio?

    I can actually delete crosstab query from Access(after copying the code to Visual Studio project) ? Let us say, Access query is called queryCrosstab, I cannot call queryCrosstab directly, since queryCrosstab does not know which team is selected by user.


    Code:
    TRANSFORM First(WorkNote.Note) AS FirstOfNote
    SELECT Teams.Username, Employee.FirstName, Employee.LastName
    FROM Teams INNER JOIN (Employee INNER JOIN WorkNote ON Employee.Username = WorkNote.Username) ON Teams.Username = WorkNote.Username
    WHERE (((Teams.TeamName)="team1") AND ((WorkNote.WorkDate)<Now()) AND ((WorkNote.WorkDate)>=Now()-7))
    GROUP BY Teams.Username, Employee.FirstName, Employee.LastName
    ORDER BY Teams.Username
    PIVOT WorkNote.WorkDate;
    Attached Thumbnails Attached Thumbnails Crosstab.jpg  

  6. #21
    VAer is offline Competent Performer
    Windows 10 Access 2013 32bit
    Join Date
    Sep 2016
    Location
    USA
    Posts
    163
    Issue Solved.
    Last edited by VAer; 01-05-2021 at 03:13 PM.

  7. #22
    VAer is offline Competent Performer
    Windows 10 Access 2013 32bit
    Join Date
    Sep 2016
    Location
    USA
    Posts
    163
    Issue Solved. Posted deleted.
    Last edited by VAer; 01-05-2021 at 03:14 PM.

  8. #23
    VAer is offline Competent Performer
    Windows 10 Access 2013 32bit
    Join Date
    Sep 2016
    Location
    USA
    Posts
    163
    Solved. Thanks

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

Similar Threads

  1. Replies: 2
    Last Post: 09-20-2020, 01:20 PM
  2. Transpose table
    By HananJanaby in forum Access
    Replies: 4
    Last Post: 04-28-2019, 12:03 PM
  3. How to Partially Transpose A Table
    By jrfost in forum Queries
    Replies: 9
    Last Post: 01-15-2019, 06:11 PM
  4. Transpose table
    By jabarlee in forum Queries
    Replies: 5
    Last Post: 07-27-2018, 07:52 AM
  5. Transpose a table using query in Access
    By Skhaliq in forum Access
    Replies: 1
    Last Post: 03-22-2018, 01:02 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