fredzeppelin
Technical User
I'm trying to reliably (of course) determine if a DoCmd.openform returns no records.
The forms are query based, some of the queries have embedded [enter parameter ?] criteria, and some are driven from form fields.
1. A method I discovered here in this forum
recommends using Dcount("field","qry").
Tried that, works fine for form parameterized criteria. Fails when the qry has a [enter parameter ?] criteria. Says "You cancelled the previous operation:run-time error 2001"
2. On my own, I experimented with testing a mandatory field (always present in a valid record) for IsNull. That seems to always work so far.
3. I know I can create a recordset and use those tools, but that seems like a lot of overhead.
Advice?
....thanks ....brad
PS, I forget the userid of the Dcount() poster, but he signs as "Captain Awesome".
Thanks to him(her?).
The forms are query based, some of the queries have embedded [enter parameter ?] criteria, and some are driven from form fields.
1. A method I discovered here in this forum
recommends using Dcount("field","qry").
Tried that, works fine for form parameterized criteria. Fails when the qry has a [enter parameter ?] criteria. Says "You cancelled the previous operation:run-time error 2001"
2. On my own, I experimented with testing a mandatory field (always present in a valid record) for IsNull. That seems to always work so far.
3. I know I can create a recordset and use those tools, but that seems like a lot of overhead.
Advice?
....thanks ....brad
PS, I forget the userid of the Dcount() poster, but he signs as "Captain Awesome".
Thanks to him(her?).