MS Access 2000 - SQL 2005 - Button Control - Programming

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

Guest

I have created a form that allows management staff to view and edit the
contents of the database used for our internal website. The specific form
allows the user to view, edit, and change the status of ideas submitted on
the website.

The problem - the form has buttons to filter the records based on the
status. At times there are no records returned for the 'Pending' status. When
this happens the form is displayed blank (no buttons or nothing).

HOW DO I: What is the correct method for determining if the recordset is
empty? I want to disable the button if the recordset is empty and enable the
button if the recordset is not empty.

What I have done so far: I have created a view in the sql server for pending
records. Is there a way in visual basic from an access form to determine if
the view is an empty recordset and perform an if function on the results.

As I am new at this I may be looking at it from the wrong perspective. Any
help available will be greatly appreciated.
 
The detail section of a form is not painted when there are no records.
However, the header and footer section are always displayed.

So if you re-organise your form with the buttons in the header or
footer you should be ok.

In fact, you can normally put everything into the header, and use
the detail section for displaying something else - like related
information. it won't display if there is no main record, but that
won't matter :~)

(david)
 
Back
Top