View Full Version : sql result


kemal
03-23-2002, 10:51 AM
my query when run shows me the count of
certain field.I can open the query and get
the count result with code it is no problem.
But this way my query remains vulnerable.What
I'd like to do is run the relevant sql code of the query in code and get the count results.How can I run the sql in code and get the result of it?

Thank you very much in advance.

RV
03-23-2002, 01:28 PM
No need to run explicit SQL statement in code.
Use DCount in code to get the number of rows selected by your query and use a message boxto display the outcome of DCount.

Some basic code:

Dim TotalFound As Integer
TotalFound= DCount("*", "yourquryname")
MsgBox "Found: "& TotalFound

Suc6,

RV