Do not open with no records

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have set up a Task reminder form in my application that I want to open when
I start the database. However, if there are no tasks (Records) how do I stop
it from opening.
 
Cancel the Open event of the form if there are no records:

Private Sub Form_Open(Cancel As Integer)
If Me.RecordsetClone.RecordCount = 0 Then
Cancel = True
End If
End Sub
 
Thanks Allen, I have copied a few of the tips on your web site. This one
worked a treat. Much appreciated from a fellow Perth boy.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top