George, IME, you have little chance of getting the dependency info to work
without crashing.
It depends on Name AutoCorrect data, which is one of the best ways of
corrupting and crashing a database that I know of. My attempts to get the
dependency info working programmatically have all ended in Access crashing.
You can circumvent the table alias if you check out the SourceTable of the
Field in the QueryDef.
--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users -
http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
"George Murnaghan" <(E-Mail Removed)> wrote in
message
news:F9CB11B4-D5D4-4699-84D2-(E-Mail Removed)...
> Hello there,
>
> Using Access 2003.
>
> When one builds a query that refers to an object X twice, Access adds a _1
> to the name, so there are two objects X and X_1 in the query.
>
> If you try to run this type of query and look at the dependencies of that
> query using VBA Access quits and sends an error report.
>
> set dependency_obj = target.getDependencyInfo
> for each obj in dependency_obj.dependencies
> ...........
> next obj
>
> Access crashes, even though there is on Error goto XXX and I get to send
> error reports. From what I see it crashes when it leaves next obj line
> (or
> if you like when it tries to execute the for each obj line on the object
> with
> the name X_1)
>
> I am looking for a method to either ignore the obj X_1, which I cannot see
> right off because Access crashs before I can get VBA to look at the name,
> or
> an explanation as why the on Error does not work in this instance.
>
> Looking forward to your assistance,
> Thanks
> George