Blank form when no records

P

Paul Naude

I have a boolean checkbox in my table indicating whether the record is
complete or not.
On my form I have a toggle button which I use to filter the records
according to their complete state.

The user toggle the button and the filter change to show either group of
records.

In the event that the other state does not show any records, and the user
click the toggle button to show that state, the form is completely blank: No
buttons, labels, nothing!

How can I check (count) the number of records that will exist in the other
state when the toggle button is pressed (so that I can warn the user and
bypass setting the filter)?
 
P

Paul Naude

Found it:

If Me.RecordsetClone.RecordCount = 0 Then
MsgBox "No records"
Cancel = True ' Optional
End If
 

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

Top