473,405 Members | 2,379 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,405 software developers and data experts.

Message if no result

Good day,

I am not a programer but have made quite a big access data base and want
to know if it is possible to have a pop up message if there are no
results for a query ?
Tempy

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 13 '05 #1
3 1414
Everything is possible in access ! (g)

Something like this would do what you want. cpp12q is the name of the
query. dob is a field in the query

Private Sub Command68_Click()
On Error GoTo Handler

If DCount("[dob]", "[cpp12q]") = 0 Then
MsgBox "There are no records to send"
Exit Sub
Else
Your code to run the query
end if
etc

HTH
David B
"Tempy" <an*******@devdex.com> wrote in message
news:42**********@127.0.0.1...
Good day,

I am not a programer but have made quite a big access data base and want
to know if it is possible to have a pop up message if there are no
results for a query ?
Tempy

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 13 '05 #2
On 5 Mar 2005 03:14:50 -0600, Tempy wrote:
Good day,

I am not a programer but have made quite a big access data base and want
to know if it is possible to have a pop up message if there are no
results for a query ?

Tempy

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!


Not from within the query itself.
However, if you make the query a Form's Record Source, and use the
form to display the query results, you can code the Form's Open event:

Private Sub Form_Open(Cancel As Integer)
If Me.RecordsetClone.RecordCount = 0 Then
MsgBox "No Records"
Cancel = True
End If
End Sub

If you wish the query, if it does have data, to look like the usual
query datasheet, simply set the form Default View to Datasheet view.
--
Fred
Please only reply to this newsgroup.
I do not reply to personal email.
Nov 13 '05 #3
Thank you for your help, i will try and come back to you if i need help.

best regards,

Tempy

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 13 '05 #4

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

Similar topics

3
by: Ipsita | last post by:
Hi, I am explaining the scenario of what I am trying to do: - I have a webform with some controls, from which I am taking the data. eg say Username, password - I am passing these data as...
0
by: situ | last post by:
hi, i'm trying to return a result set from a procedure using i series navigator. how ever i am getting the results back but with warning as below. Message: 1 result sets are available from...
3
by: wissywise | last post by:
Hi all, I have written some codes in "C" but each time I tried to run the code after it has been compiled, I get a message telling me to turn the deburger on. I tried but no progress. An example...
46
by: C C++ C++ | last post by:
what is an escaping variable?
23
by: Raz | last post by:
On Wed, 30 Apr 2008 21:54:37 GMT, Erik Wikströ As I said, I will find the link again. His knowledge of C++ is just fine. ...
0
by: WaterWalk | last post by:
Until Python 2.5, the exception object still uses ansi string. Thus, in the following example: f = open(u"\u6d4b.log") Suppose the file to open does not exist, the output message of the...
2
by: FutureShock | last post by:
I am using a registration class to process a registration form and need some opinions on returning error messages. I am self referring the page on submit. I would like to send each form field...
1
by: Gramma2005 | last post by:
I am trying to connect to an access db through php on Windows Server 2003 running XAMPP. The code I am using has worked before on another access db on this server so I am not sure what is causing...
6
by: simon2x1 | last post by:
the code below is my mail code its working but message sent to the email is going to the spam mail not the inbox how can make the message go to indox <?php require_once("connect.php"); //...
14
riverdale1567
by: riverdale1567 | last post by:
Hi I am a newbie trying to get some of my first code working, yada yada yada. I have a drop down box which chooses a state then takes the post data to 'processform2.php' to use that to pull up...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.