empty form opens-BAD

  • Thread starter Thread starter Beth
  • Start date Start date
B

Beth

What is the method to prevent the opening of a form when
no record exists in that recordset?

Please note: I call the form to open with a command
button that is on an UNBOUND form.

Using HasData does not work as I have used it. It works
well for me when the calling form has a recordset, thus a
field to test that I can point to, but the calling form
is UNBOUND. What to do?

Is there a modification to be made to HasData? Another
method?

Any help is appreciated. This is frustrating.

Beth
 
Private Sub Form_Open(Cancel As Integer)
If Me.RecordsetClone.RecordCount < 1 Then Cancel = True
End Sub

What is the method to prevent the opening of a form when
no record exists in that recordset?

Please note: I call the form to open with a command
button that is on an UNBOUND form.

Using HasData does not work as I have used it. It works
well for me when the calling form has a recordset, thus a
field to test that I can point to, but the calling form
is UNBOUND. What to do?

Is there a modification to be made to HasData? Another
method?

Any help is appreciated. This is frustrating.

Beth

Jeremiah Ellison
Ellison Enterprises - Your One Stop IT Experts
 
Back
Top