×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Microsoft Access failure check

Microsoft Access failure check

Microsoft Access failure check

(OP)
When DoCmd.OpenForm with a select statement fails, Access opens a form with nothing on it. Is there any way to check if the OpenForm failed? there is no return value for openform in the documentation. I am using Access 2000

RE: Microsoft Access failure check

You might try checking the IsLoaded property of the Form via the Application Forms collection.

Good Luck
--------------
As a circle of light increases so does the circumference of darkness around it. - Albert Einstein

RE: Microsoft Access failure check

(OP)
The problem is not finding out if the form is loaded, the problem is: if a record matching my SQL select statement ( an argument to DoCmd.OpenForm) does not exist, and select fails I want to know that so that I can take the appropriate action. How do I know if a record matching the select statement does not exist?

Thanks

RE: Microsoft Access failure check

What do you get when you check the Form.Recordset.EOF and BOF properties in the Form_Load Event?

Good Luck
--------------
As a circle of light increases so does the circumference of darkness around it. - Albert Einstein

RE: Microsoft Access failure check

(OP)
If by this check you are trying to see if the table is empty, it is not. It just does not have the record matching the criteria in the select statement. Therefore, the form shows up as a blank form with no controls on it.

RE: Microsoft Access failure check

Not checking the table, but checking the form's recordset.  The recordset will contains the results of the SQL statement.

Good Luck
--------------
As a circle of light increases so does the circumference of darkness around it. - Albert Einstein

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources