Prev: default footnotes instead of endnotes in moving from text
Next: HowTp Question:Append vs Update
From: naveen prasad on 1 Feb 2010 11:11 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 1 Feb 2010 11:24 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.
|
Pages: 1 Prev: default footnotes instead of endnotes in moving from text Next: HowTp Question:Append vs Update |