title: Access crashed on loading userform
body: <p>I have built my application but a problem has arisen that I cant get my head around - My application has no autoexec yet so I open access and double click on my userform to open it.</p>
  
  <p>On opening the userform Access crashes and closes</p>
  
  <p>However, if I first put the userform in design view, then open the form in form view it works fine.</p>
  
  <p>How can this be?</p>
  
  <p>It cant be the Form Load coding or it would still crash when going from design view to form view.</p>
  
  <p>I will include my form load coding in case:</p>
  
  <pre><code>Me.LastImport.Value = DLast("LastImport", "tbl_Import_Export_logger")
  Me.Text42.Value = Date
  Me.Text44.Value = Date - Weekday(Date, 3)
  
  'Compliance Reporting
  Me.Text68 = DCount("[CustomerAccountNumber]", "Q_HealthChecksOverdue") 'Overdue Health Checks
  Me.Text76 = DCount("[CustomerAccountNumber]", "Q_HealthChecksdue") ' Due Health Checks
  Me.Text74 = DCount("[CustomerAccountNumber]", "Q_HealthChecksCompleted") ' Completed Health Checks
  Me.Text72 = DCount("[LettersDueStatus]", "Q_LettersSent_Query") 'Count number of letters sent
  </code></pre>