title: Compile Error: Invalid Use of Property
body: <p>I have an Access DB that I am constructing. My VB education is bits and pieces I've needed to customize the DB more than what Access does so it's very spotty. I have a button that runs the following code when pushed. The code works fine. The issue is when I go to the VB screen and Compile under the Debug menu, I get an error stating "Compile Error: Invalid Use of Property."</p>
  
  <pre><code>' Memo Line Button Script
  Private Sub Memo_Line_Click()
  On Error GoTo Memo_Line_Click_Err
  
      If Me.Dirty Then Me.Dirty = False
      Memo_Line ([Forms]![Logform]![HLCtrl]) 'error highlights ![HLCtrl]
  
  Memo_Line_Click_Exit:
      Exit Sub
  
  Memo_Line_Click_Err:
      MsgBox Error$
      Resume Memo_Line_Click_Exit
  
  End Sub
  </code></pre>
  
  <p>Memo_Line refers to a public function. That code is listed below.</p>
  
  <pre><code>' Copy Offer Memo Line Data to Clipboard Button Script
  Public Function Memo_Line(HLC)
  On Error GoTo Memo_Line_Click_Err
  
      DoCmd.OpenForm "Log-Memo Line", acNormal, "", "[HL#]=" &amp; "'" &amp; HLC &amp; "'", , acNormal
      Call ClipBoard_SetData([Forms]![Log-Memo Line]![Memo])
      MsgBox ([Form_Log-Memo Line].[Memo] &amp; " --- copied to Clipboard."), vbInformation, "Clipboard Details"
      DoCmd.Close acForm, "Log-Memo Line"
  
  Memo_Line_Click_Exit:
      Exit Function
  
  Memo_Line_Click_Err:
      MsgBox Error$
      Resume Memo_Line_Click_Exit
  
  End Function
  </code></pre>