Solved

How to Pop Up a message to user

Posted on 2004-09-09
6
207 Views
Last Modified: 2013-11-28
Newb question:  How do I pop up a message to the user if the QUERY got no results to show in my DBGRID?
0
Comment
Question by:VirtueTech
[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
  • 4
  • 2
6 Comments
 
LVL 13

Accepted Solution

by:
BlackTigerX earned 500 total points
ID: 12019359
ADOQuery.Open
if (ADOQuery.IsEmpty) then
  ShowMessage('no records returned')

works the same for TQuery
0
 

Author Comment

by:VirtueTech
ID: 12019481
Thanks.

How can I change the popup window title/caption?
0
 

Author Comment

by:VirtueTech
ID: 12019518
Nevermind I found it. Thanks.
0
SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

 
LVL 13

Expert Comment

by:BlackTigerX
ID: 12019573
mmm... the quick and dirty way:

procedure ShowMessageWithTitle(const Msg, Title:string); //use this procedure, provide message and title
var
  s:string;
begin
  s:=Application.Title; //save the original title
  Application.Title:=Title; //put the title you want in your message box
  ShowMessage(Msg);
  Application.Title:=s //restore original title
end;

procedure TForm1.Button1Click(Sender: TObject);
begin
  ShowMessageWithTitle('a big long message', 'with title')
end;
0
 
LVL 13

Expert Comment

by:BlackTigerX
ID: 12019589
or the right way... lol
MessageBox(Handle, 'The message here', 'The title here', 0)
0
 
LVL 13

Expert Comment

by:BlackTigerX
ID: 12019597
guess the other wasn't so quick... =o(
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Read about how to choose the best possible content marketing agency to suit your needs. Content marketing has become an integral part of running a successful tech business, so it is wise to be informed.
Online promotion is consistently becoming more important for all types of businesses. From Facebook ads to search engines to YouTube videos, there are all sorts of channels that can effectively be used to promote a business or product. But how shoul…
Viewers will get an overview of the benefits and risks of using Bitcoin to accept payments. What Bitcoin is: Legality: Risks: Benefits: Which businesses are best suited?: Other things you should know: How to get started:
An overview of how to create reports in Adobe Analytics (formerly Omniture Site Catalyst) using pageNames, events, eVars and props. This video will show you how to install the Omniture Debugger tool so can see (and test) what is being passed int…

738 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