title: Converting Rows to Columns in Access
body: <p>I have a list of 750 sections of classes in Access and then the counts of the number of students that are in the class by section. It looks like this where 1 am refers to week 1 of the camp and am is the morning session and pm is the afternoon session.</p>
  
  <pre><code>Name                Count
  Babysitting - 1am     5
  Babysitting - 1PM     7
  Arts &amp; Crafts - 1am   9
  Arts &amp; Crafts - 1am   6
  ...
  </code></pre>
  
  <p>I need it to be structured by session though per class. Like this:</p>
  
  <pre><code>Name          Week1am    Week1PM
  Babysitting      5         7
  Arts &amp; Crafts    9         6
  </code></pre>
  
  <p>I have the week and time codes as separate fields in the class table, but I needed them to display in the name of each class in the class table for another reason. I know how to get the last 5 characters off the name for this query though. I used: <code>Left ([Name], Len([Name])-5)</code>. However, I'm not sure if after I do that if it's possible to use a group by query to get to the final output I'm looking for at that point.</p>
  
  <p>If anyone can help I would really appreciate it.</p>