title: MS Access: select maximum column value of a table
body: <p>In my microsoft access database name is DBMS.accdb and I have an employee table and one of the column of the table is salary. I have created a form and on form load I want to get the max salary of the table and do some calculation and then set the value in a text box(total_salary) of the form. I want something like this</p>
  
  <pre><code>Private Sub Form_Load()
      Dim salary As Number
  
      salary = "SELECT MAX([EMP (staff) Salary]) FROM Employee"
      salary = salary + (1000 / 23)
      total_salary.Value = salary
  End Sub
  </code></pre>
  
  <p>I tried several way using the help from internet but it is not working. I get some error every time.</p>
  
  <p>How can I do this? </p>