From: David W. Fenton on
"Stuart McCall" <smccall(a)myunrealbox.com> wrote in
news:Fr8_n.169687$aS3.133763(a)hurricane:

> Here's how I'd write that:
>
> Public Function IsMDE() As Boolean
> On Error Resume Next
> IsMDE = (CurrentDb.Properties("MDE") = "T")
> End Function

I would never write code like that, because there is a history with
On Error Resume Next not going out of scope.

When I see that code, I react "lazy programmer."

Use an error handler that ignores the specific error and then you
don't run the danger of losing error reporting in other places.

In fact, that's what Tony's code does, and it can be used for any
database, not just the one currently opened in the UI.

So, it seems to me your version is inferior to Tony's in every way.

--
David W. Fenton http://www.dfenton.com/
usenet at dfenton dot com http://www.dfenton.com/DFA/
From: Stuart McCall on
"David W. Fenton" <XXXusenet(a)dfenton.com.invalid> wrote in message
news:Xns9DB291529B81Cf99a49ed1d0c49c5bbb2(a)74.209.136.88...
> "Stuart McCall" <smccall(a)myunrealbox.com> wrote in
> news:Fr8_n.169687$aS3.133763(a)hurricane:
>
>> Here's how I'd write that:
>>
>> Public Function IsMDE() As Boolean
>> On Error Resume Next
>> IsMDE = (CurrentDb.Properties("MDE") = "T")
>> End Function
>
> I would never write code like that, because there is a history with
> On Error Resume Next not going out of scope.
>
> When I see that code, I react "lazy programmer."
>
> Use an error handler that ignores the specific error and then you
> don't run the danger of losing error reporting in other places.
>
> In fact, that's what Tony's code does, and it can be used for any
> database, not just the one currently opened in the UI.
>
> So, it seems to me your version is inferior to Tony's in every way.
>
> --
> David W. Fenton http://www.dfenton.com/
> usenet at dfenton dot com http://www.dfenton.com/DFA/

I take it you didn't notice the <g,d&r> at the end. Sigh. Get over it David.


From: Stuart McCall on
> it can be used for any
> database, not just the one currently opened in the UI.

When I see that statement I react "blind programmer".


From: David W. Fenton on
"Stuart McCall" <smccall(a)myunrealbox.com> wrote in
news:tAt_n.154596$_F1.101108(a)hurricane:

> "David W. Fenton" <XXXusenet(a)dfenton.com.invalid> wrote in message
> news:Xns9DB291529B81Cf99a49ed1d0c49c5bbb2(a)74.209.136.88...
>> "Stuart McCall" <smccall(a)myunrealbox.com> wrote in
>> news:Fr8_n.169687$aS3.133763(a)hurricane:
>>
>>> Here's how I'd write that:
>>>
>>> Public Function IsMDE() As Boolean
>>> On Error Resume Next
>>> IsMDE = (CurrentDb.Properties("MDE") = "T")
>>> End Function
>>
>> I would never write code like that, because there is a history
>> with On Error Resume Next not going out of scope.
>>
>> When I see that code, I react "lazy programmer."
>>
>> Use an error handler that ignores the specific error and then you
>> don't run the danger of losing error reporting in other places.
>>
>> In fact, that's what Tony's code does, and it can be used for any
>> database, not just the one currently opened in the UI.
>>
>> So, it seems to me your version is inferior to Tony's in every
>> way.
>
> I take it you didn't notice the <g,d&r> at the end. Sigh. Get over
> it David.

Get over what?

--
David W. Fenton http://www.dfenton.com/
usenet at dfenton dot com http://www.dfenton.com/DFA/