title: ASC/DESC sorting in MS Access
body: <p>I have a table like this:</p>
  <pre><code>Name     Country      Grade
  Lily     Germany      A
  Anna     USA          C
  Leon     Slovenia     -
  Mia      Italy        
  Carlos   Mexico       B
  </code></pre>
  <p>And have two buttons:</p>
  <pre><code>1. ASC button
  2. DESC button
  </code></pre>
  <p>I am trying that the buttons sort the table in asc/desc order but the problem is that i have A,B,C letters but are actually grades. With my code:</p>
  <pre><code>Private Sub cboAufS_Click()
  
  If Me.cboFilData = &quot;KK&quot; Then
          Me.Text1163.SetFocus
          DoCmd.RunCommand acCmdSortAscending
      End If
  End Sub
  
  Private Sub cboAbS_Click()
  If Me.cboFilData = &quot;KK&quot; Then
          Me.Text1163.SetFocus
          DoCmd.RunCommand acCmdSortDescending
      End If
  End Sub
  </code></pre>
  <p>This code gives me the wrong results, for ASC i get : &quot; &quot;, -, A, B, C and need &quot; &quot;, - C, B, A, and for DESC i get C, B, A, -, &quot; &quot; and i need A, B, C, -, &quot; &quot;</p>
  <p>Can someone please help me?</p>