I've setup VB script to export query results to a file. If the query output
is null or has no records, I would like to provide the user with a message
rather than export an empty file.
Also, I would like to detect if there are empty values for a particular
field in the query and alert the user of this. Is there a way to do this?
Any help is appreciated.
Hi,
you can use for example DCount() function, to check if your query return any
record:
if DCount("*","MyQyery")=0 then
MsgBox "No Records!"
else
'export
end if

Signature
Alex Dybenko (MVP)
http://alexdyb.blogspot.com
http://www.PointLtd.com
> I've setup VB script to export query results to a file. If the query
> output
[quoted text clipped - 5 lines]
>
> Any help is appreciated.
JR_06062005 - 20 Jan 2006 17:43 GMT
It works. Thanks
> Hi,
> you can use for example DCount() function, to check if your query return any
[quoted text clipped - 15 lines]
> >
> > Any help is appreciated.