Solved

ON No Data and form

Posted on 2011-02-15
2
349 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

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

As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
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.
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…

752 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