-----Original Message-----
No, if your query has parameters in it, then the way I posted DCount will
not work....it cannot resolve the parameters.
However, you can put your own parameters in the DCount function as the third
argument. For your situation, make a copy of the query and delete the
parameter from the query. Then put the parameter (as a WHERE string but
without the WHERE) as the third argument. For example,
DCount("*","myqueryname","[FieldName] Like 'A*'")=0
Or whichever criterion expression you want to use. Replace FieldName with
the actual name of the field for which the crierion applies.
--
Ken Snell
<MS ACCESS MVP>
JUAN said:
Hello Ken,
thanks. Works fine but when I put a parameter in my query,
this doesn't work. So I'm assuming that this condition
doesn't work with parameters in query? This is what I have
in my field under Criteria in my query:
Like [ENTER A* FOR EU B* FOR NA AND * FOR ALL]
I have in the parameters Box ENTER A* FOR EU B* FOR NA AND
* FOR ALL
Would appreciate it if you have any ideas.
Thanks,
Juan
-----Original Message-----
DCount("*","myqueryname")=0
The above condition willl be true if there are no records
returned by the
query.
--
Ken Snell
<MS ACCESS MVP>
Hello,
using 97. and trying to do a condition in a macro, but
cant' seem to get it to work.
If there is no data in my query, then I want to display
message that NO Data and stop macro. So I test with
data:
DCount("*","myqueryname")>0 and works so trying to use
same concept but only if my query doesn't contain data.
Can anyone provide any input?
Thanks,
Juan
.
.