How to inform a user by search result?

  • Thread starter Thread starter ghost
  • Start date Start date
G

ghost

Greeting,
I have a form for showing the result of search. In this form there is a
subform for showing the result. What I want to do is once the user put the
criteria and click the button for opening the form of the result, a message
or label appears in the form result telling the user there is no data found
if there is no data. How can I do that?
 
On Sat, 26 Jan 2008 13:10:01 -0800, ghost

You could check the RecordCount of the RecordsetClone of the subform:
if Me.yoursubformcontrolname.Form.RecordsetClone.RecordCount = 0 then
Msgbox "There is no data matching these criteria",vbInformation
end if

-Tom.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top