Solved

How to Pop Up a message to user

Posted on 2004-09-09
6
212 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
Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

 
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

A great marketing strategy is diverse.  Read about the not so popular, yet effective, marketing tactics you can start using today!
Learn about the eCommerce marketing trends for the year ahead.
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…
Use Wufoo, an online form creation tool, to make powerful forms. Learn how to selectively show certain fields based on user input using rules to gather relevant information and data from your forms. The rules feature provides you with an opportunity…
Suggested Courses
Course of the Month10 days, 15 hours left to enroll

628 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