Need Result show in Message Box

  • Thread starter Thread starter naveen prasad
  • Start date Start date
N

naveen prasad

Hi all....
Need your help badly....

example....

table t1 fields are name,place, designation,company

query q1 select count(designation) from t1;

query when executed result is 15.

Form f1 has command button cmd1

when clicked it will execute the query but result is comming in spread sheet
window.

what i need when clicked it should show result in message box...

pls help me how can i do it
 
Hi all....
Need your help badly....

example....

table t1 fields are name,place, designation,company

query q1 select count(designation) from t1;

query when executed result is 15.

Form f1 has command button cmd1

when clicked it will execute the query but result is comming in spread sheet
window.

what i need when clicked it should show result in message box...

pls help me how can i do it

The Count function counts records. What is in [designation]? Are you trying to
count the number of distinct designation values in the table (you have no
criteria in the query). Your query will in fact count the number of records in
t1 which have non-NULL values in designation.

And a Msgbox is a *very* user unfriendly manner of presenting data.

What real-life problem are you attempting to solve? What should you be
counting? What will the user do with the 15 when she sees it?
 
I think this is the third message I have seen that you have asked the same
question. Can't you ask once and then if you don't understand, reply back in
the same thread?

Duane Hookom
MS Access MVP
 
Back
Top