I can get the following code to run manually on a button but it will not do anything when put into the on load event of the form. I'm sure I'm missing something obvious but can't see what it is! "newenquirysiteslistq" is a query of address's based on the name of the customer within the form.
Private Sub Form_Load()
If Nz(dcount("*", "newenquirysiteslistq"), 0) < 2 Then
Me.previous_sites.Visible = False
Else
Me.previous_sites.Visible = True
End If
End Sub