title: How to declare and set variable in ms access 2007 query
body: <p>I want to declare and set variables in ms access 2007 database query. I want to store 2 database query results in 2 variables because they are integer or string types after execution. I want to know how can I declare and set variables?</p>
  
  <p>SQL server equivalent would be something like this</p>
  
  <pre><code>declare @var1 varchar(50)
  set @var1 = 'select * from table'
  </code></pre>