• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 364
  • Last Modified:

ON No Data and form

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
1 Solution
...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"
' do nothing
end if
pdvsaProject financeAuthor Commented:
thank you...it worked perfectly.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Easily Design & Build Your Next Website

Squarespace’s all-in-one platform gives you everything you need to express yourself creatively online, whether it is with a domain, website, or online store. Get started with your free trial today, and when ready, take 10% off your first purchase with offer code 'EXPERTS'.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now