473,394 Members | 1,663 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

NoData for forms

Is there a way to check if there are no records in a filtered form and
display an error message such as can be done using the NoData event for a
report?
Feb 22 '07 #1
1 1937
On Thu, 22 Feb 2007 01:34:01 GMT, Jimmy wrote:
Is there a way to check if there are no records in a filtered form and
display an error message such as can be done using the NoData event for a
report?
Filtered how?
Is the form's record source a filtered query?
Do you mean when you open the form?
Code the Form's Open event:

If Me.RecordsetClone.RecordCount = 0 Then
MsgBox "No Records found."
Cancel = True
End IF
--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail
Feb 22 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: CSDunn | last post by:
Hello, I have an Access 2003 report that opens in print preview and then maximizes upon clicking a button from a form. The OnClick event of the button fires a macro to open the report. How can...
0
by: manning_news | last post by:
Using A2K. I've got 2 reports that I want to print one after the other. Below is the coding: DoCmd.OpenReport "rptBilling_FutureCharges", acViewPreview DoCmd.OpenReport "rptBilling_Summary",...
1
by: Rui Soares via AccessMonster.com | last post by:
I have a report with the NoData event and i need to use the OutputTO command to create a .snp file, this is possible??? -- Message posted via AccessMonster.com...
4
by: Richard Sherratt | last post by:
Access 97 and SQL Server 2000. Reports in this system are driven from a parameter form. Parameters are used to make a WHERE clause. If no parameters are selected, strWhere is a zero length...
3
by: Joshua Russell | last post by:
Hi, Both the methods below open up a windows form called MasterForm. However, one works better than the other. Method 1 opens the form correctly but I don't have any reference to the instance of...
7
by: Mike Bulava | last post by:
I have created a base form that I plan to use throughout my application let call the form form1. I have Built the project then add another form that inherits from form1, I add a few panel controls...
3
by: Lloyd Sheen | last post by:
I have the following situation: Need a user resizable user control. After much trying with user control I came across the idea of hosting the controls in a form marked as not TopLevel = false. ...
15
by: sara | last post by:
I am stuck. I have a report that I use in multiple places, so I call it with varying parameters (using the Where Clause in the code). I preview the report, send it to snap, then close the...
4
by: cobolguy | last post by:
I have a report that I run from a Macro. This macro executes when you click the printer icon button on the form. The macro is simple: 1. open report 2. printout 3. close report . All this works fine...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.