title: Access VBA Object Required Error, referencing Field in a Table for IF statement
body: <p>I am getting an object required error and because that is so horribly vague, I am having trouble fixing it.  I am trying to say: If the AssocID field is blank for this record, go through with the SQL statement, etc.  If it's not, display a MsgBox and go to the next record.  Here is my code.</p>
  
  <pre><code>Private Sub StartButton_Click()
      DoCmd.SetWarnings False
      Dim mySQL As String
      GetID = Forms!frm_MainMenu!AssocIDBox
      CurRecord = Forms!frm_EC_All![Loan#].Value
      mySQL = "UPDATE tbl_Data SET tbl_Data.[AssocID] = " &amp; GetID &amp; " , tbl_Data.[tsStartAll] = Now WHERE tbl_Data.[Loan#] = " &amp; CurRecord
      '
      '
      '
      If IsNull(tbl_Data.AssocID.Value) Then
          DoCmd.RunSQL mySQL
          DoCmd.SetWarnings True
          Me.TimerActivatedLabel.visible = True
          Me.Refresh
          ClaimedMsg = MsgBox("Loan has been assigned to you.", vbOKOnly, "Loan Assigned")
              If ClaimedMsg = vbOK Then
                  DoCmd.SetWarnings False
                  DoCmd.RunSQL "UPDATE tbl_Data SET tbl_Data.[tsHaveDocs] = Now WHERE tbl_Data.[Loan#] = " &amp; CurRecord
                  DoCmd.SetWarnings True
              End If
      Else
          AlreadyAssignedMsg = MsgBox("Loan has already been assigned.  Press OK to move to the next loan.", vbOKOnly, "Already Assigned!")
              If AlreadyAssignedMsg = vbOKOnly Then
                  DoCmd.GoToRecord , , acNext
              End If
      End If
  End Sub
  </code></pre>
  
  <p>The error occurs on the If IsNull(etc) line.  I've looked at a lot of other stuff but it either didn't apply or I didn't really understand what they were talking about.  I'm still kind of a beginner.  Thanks!</p>