Elizabeth Carter
Elizabeth.Carter at telus.com
Fri Oct 31 16:17:21 CST 2003
Thanks very much, I'll give that a try.
Liz
-----Original Message-----
From: Developer [mailto:Developer at ultradnt.com]
Sent: October 31, 2003 2:03 PM
To: 'Access Developers discussion and problem solving'
Subject: RE: [AccessD] Acc 2K on Win 2K; open an existing query in code
It did show up, I even answered, LOL...
>I just want to know in code if the query will return any rows or not.
Liz,
If all you need is a count, try:
lngCount=Dcount("primary_key_field","qry_something")
If lngCount > 0 then ' you have rows
There's even an optional where clause available as the third parameter
for the function, so you can count how many in the query/table meet a
certain criteria.
Steve
-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Elizabeth
Carter
Sent: Friday, October 31, 2003 4:29 PM
To: Access List
Subject: [AccessD] Acc 2K on Win 2K; open an existing query in code
Hi All,
I sent this the other day but it doesn't seem to have shown up, so if
you get this more than once I apologise.
I have tried searching the archives and have not found the answer that I
seek... probably means answer is no :)
I would like to know if it's possible to open an existing query and
store it's output into a recordset. I don't want a form to open that the
user sees, I just want to know in code if the query will return any rows
or not.
Any help would be greatly appreciated.
Liz
_______________________________________________
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com
_______________________________________________
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com