title: VBA: Calling Function from Sub
body: <pre><code>Private Function DisplayReport()
      DoCmd.OpenReport List0, acViewNormal
  End Function
  
  Private Sub Command3_Click()
  
  End Sub
  </code></pre>
  
  <p>I'm trying to figure out how to call DisplayReport() when Command3 is clicked
  (This is in Access 2010).</p>
  
  <p>I'm hoping this will open the report that is currently selected in List0 (a list box). Is this the proper way of doing it?</p>
  
  <p>EDIT: I think I understand from reading somewhere else that this is a "Trusted Location" issue? What does this mean and how can I fix this?</p>