Marshall, I'm using queries to populate forms with information such as
one employees' sales for a period. I want to check the query before opening
the form to determine if there are any records that meet the cretia. I have
a function 'Checkrec' that determines the number of records in a table (
returns -1 if no records.) It doesn't work for queries.
Marshall, I'm using queries to populate forms with information such as
one employees' sales for a period. I want to check the query before opening
the form to determine if there are any records that meet the cretia. I have
a function 'Checkrec' that determines the number of records in a table (
returns -1 if no records.) It doesn't work for queries.
Does that mean you want to know what a **saved** query will
do given just its name?? If so, you could probably use
DCount("*","nameofquery") > 0 to check for that.
If that doen't do what you want, then you could open a
recordset on the query and check the recordset's RecordCount
property.
I have no idea how that might, or might not, fit into
whatever your existing function is doing though.
That is exactly what I was looking for .
Thank you
Frank
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.