From: naveen prasad on
Hi all

please help me

table t1 fields f1,f2,f3 are name, mob,date
I have a form with a command button, when clicked it executes a query and
result will appear normally how we see like a spread sheet will be poped up.

for example i have created a query as
"select count(f1) from t1" normally if we run query the result will be in
spread sheet in a single cell( let say result is 100)

now what i want is when i clicked the command button , a message box should
appear with result on it i.e message box displays 100

kindly help me how to do it in coding also if required.

thanks





From: ghetto_banjo on
in the onclick event of the command button, you could do something
like this:


Msgbox Dcount("[F1]", "T1"), vbokonly


this doesn't use any saved query you may have, but just uses the
DCount function to get that count of F1 in table T1. If you have a
more complex query that you want to show the result of, you can use
the DLookup Function to grab your result.