Need to show result in message box

N

naveen prasad

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
 
G

ghetto_banjo

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top