title: Access VBA Text Box Visible If
body: <p>I have a simple access database that holds contacts. My people table has a column named "Last Contact" that is a date value representing the date of last contact. On my main screen I have a form that displays the person's information, including the "Last Contact" date.  </p>
  
  <p>I need to build in an alert system that let's users know when it has been longer than 30 days since the last contact date. I have built a simple text box that accomplishes this by displaying the text "30 Days" in big red letters. The name of this text box is "notice."</p>
  
  <p>My problem comes with having this text box only appear when it has been 30 days or more since the "Last Contact" date. I am using the code below:</p>
  
  <pre><code>Sub notice()
  Dim dateone As Date
  Dim datetwo As Date
  Dim days As Integer
  Dim notice As Object
  
  dateone = Last_Contact!
  datetwo = Date
  days = DateDiff("d", dateone, datetwo)
  notice = [notice]
  
  If days &gt;= 30 Then
  notice.Visible = True
  Else
  notice.Visible = False
  End If
  End Sub
  </code></pre>
  
  <p>When I run this, I get an "Overflow" error. Can someone please assist me with this? </p>
  
  <p>Thank you in advance. </p>