Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

How to Pop Up a message to user

Posted on 2004-09-09
6
Medium Priority
?
217 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 2000 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
Meet the Family that is Made for Collaboration

The TeamConnect Family product group as part of the Sennheiser for Business Portfolio comprising high-quality, technically well-conceived meeting solutions for business communication – designed for any meeting room and any meeting situation.

 
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

[Video] Oticon Case Study

Open office environments can create the dynamics for innovation, but they also bring some challenges. With over 1,000 employees in an open office, Oticon needed a solution that would preserve the environment while mitigating disruptive background noises.

Watch how they did it.

Question has a verified solution.

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

Learn about the eCommerce marketing trends for the year ahead.
Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
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:
Use Wufoo, an online form creation tool, to make powerful forms. Learn how to choose which pages of your form are visible to your users based on their inputs. The page rules feature provides you with an opportunity to create if:then statements for y…
Suggested Courses

660 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