Re: At wits end - code breaks even with OnError Resume Next
From: RD (progr_at_ming.zen)
Date: 03/07/05
- Next message: doyle60_at_aol.com: "Re: How to split a field into parts"
- Previous message: Brian: "Re: Unbound controls and AllowEdits = False"
- In reply to: Ted Allen: "RE: At wits end - code breaks even with OnError Resume Next"
- Next in thread: Ted Allen: "Re: At wits end - code breaks even with OnError Resume Next"
- Reply: Ted Allen: "Re: At wits end - code breaks even with OnError Resume Next"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 07 Mar 2005 11:21:29 -0800
Well that's pretty much what I'm doing.
I go to a db, loop through the tables and write their names and the
name of the source db to a table. Almost none of the tables have
descriptions so I figured I could fill that in later. Then I loop
through the queries and write their names, source db names and
descriptions to a "Queries" table. And so on down the list: Forms,
Reports, etc.
The problem arises when I try to pull in the description of a query
that has no description. It looks to me like if there *is* no
description then the "Description" property never gets created. If
that's the case, I can't figure out how to check without generating
the "Property not found" error. The second I refer to the property,
the error occurs.
But, frankly, that's not really the point. I've done everything in my
power to stop Access from *breaking* to the debugger when it
shouldn't.
I guess my next step will be to try it on a different machine to see
if it's the database or my copy of Access.
On Mon, 7 Mar 2005 08:35:05 -0800, Ted Allen
<TedAllen@discussions.microsoft.com> wrote:
>Unfortunately I don't have an idea as to why your code is breaking with the
>error handler, but there is another way that you can go through the
>properties without generating the error if that helps.
>
>If you want most or all of the object properties, you can just loop through
>the properties collection and write the object name, property name and the
>property value to a log table. Later you can query out specific properties
>if you like.
>
>If you just want a few properties, you can use an if statement within your
>loop to check to see if property name is equal to one of the properties you
>are interested in, and if so log the prop name and value. Or, you could use
>a select case statement to log the value in an appropriate field if you
>wanted to do it more as a flat file.
>
>Using any of those methods, you shouldn't run into errors because you'll
>never be asking for a property that doesn't exist, you'll just be checking to
>see if the property name is equal to one or more strings.
>
>HTH, Ted Allen
>
>"RD" wrote:
>
>> There seems to be absolutely nothing I can do to keep this damn thing
>> from breaking.
>>
>> I even rebuilt the database, C&Ping the code into NotePad and C&Ping
>> it into a new module.
>>
>> Break on Unhandled Errors is Ticked.
>>
>> I have an Error handler.
>>
>> I've handled the exact error being generated.
>>
>> I've tried ignoring errors (Resume Next does nothing).
>>
>> Background:
>> I've built this db that goes to other Access dbs, enumerates their
>> tables, queries, forms, etc. and writes their names and some
>> properties into various tables.
>>
>> In these various external dbs, some tables, queries, etc. have
>> descriptions and some don't. Because the idea is to analyze these
>> other dbs, I want those descriptions if they're there. The problem
>> arises when the code hits a query that doesn't have a description. It
>> generates a Run-time Error 3270: Property not found. And I can't get
>> it to stop breaking.
>>
>> There are hundreds of queries and most of them have descriptions.
>>
>> At best my rep rides on this ...
>>
>> at worst, my job.
>>
>> A little help here?
>>
>> Thanks,
>> RD
>>
>>
- Next message: doyle60_at_aol.com: "Re: How to split a field into parts"
- Previous message: Brian: "Re: Unbound controls and AllowEdits = False"
- In reply to: Ted Allen: "RE: At wits end - code breaks even with OnError Resume Next"
- Next in thread: Ted Allen: "Re: At wits end - code breaks even with OnError Resume Next"
- Reply: Ted Allen: "Re: At wits end - code breaks even with OnError Resume Next"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|