Solved

ON No Data and form

Posted on 2011-02-15
2
339 Views
Last Modified: 2012-05-11
Experts, I do not see an On No Data event for forms.   I need a msgbox that appears if no data much like the ON No Data Event for reports.

thank you
0
Comment
Question by:pdvsa
2 Comments
 
LVL 77

Accepted Solution

by:
peter57r earned 500 total points
ID: 34896499
...much like the ON No Data Event for reports....

What you do if there is no data in a report is up to you as the developer.  There is no fixed outcome.

In a form, you can test the size of the recordset and certainly pop up a msgbox as you have indicated.

In the form load event procedure..

if me.recordsetclone.recordcount = 0 then
msgbox "There is no current data to display in this form"
else
' do nothing
end if
0
 

Author Closing Comment

by:pdvsa
ID: 34898106
thank you...it worked perfectly.
0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Overview: This article:       (a) explains one principle method to cross-reference invoice items in Quickbooks®       (b) explores the reasons one might need to cross-reference invoice items       (c) provides a sample process for creating a M…
As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
Familiarize people with the process of utilizing SQL Server views from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Access…
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.

828 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question