I'm an Access novice and while creating a database I have hit upon a problem displaying the results of a query on a form.
I am using a form in continuous form view with bound textboxes to display the results of a query. This works perfectly. However I wish to display a message to the user if the query contains no results and prevent the form from loading.
I have looked for an equivalent form property to that of the report property - On No Data. I have not found one, does an equivalent exist?
If not would it be possible to place some code in the form to examine the query and if empty report to the user and close the form.
You are receiving the error because you need to add a reference to the ADO library to your VB project. On the VB Tools menu, click on References. Scroll down until you find the Microsoft ActiveX Data Objects 2.7 library.
Glad to hear that you found something comperable. That's one of the beauties of programming. There is always more than one way to accomplish the task!