Solved

ON No Data and form

Posted on 2011-02-15
2
310 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

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

In the previous article, Using a Critera Form to Filter Records (http://www.experts-exchange.com/A_6069.html), the form was basically a data container storing user input, which queries and other database objects could read. The form had to remain op…
Experts-Exchange is a great place to come for help with solutions for your database issues, and many problems are resolved within minutes of being posted.  Others take a little more time and effort and often providing a sample database is very helpf…
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …

706 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now