James, I will check into this further, but a cursory glance suggests that
the NavigateTo method is faulty.
It's a new method of the DoCmd object in A2007, for manipulating the
Navigation Pane. The NavigateTo action in a macro works okay. If you show
the Arguments column in macro design, you see arguments such as
acNavigationCategoryObjectType, acNavigationGroupTables
If you then open the Object Browser (F2 in the code window), show hidden
members (right-click) and search for acNavigationCategoryObjectType, it
doesn't exist. Similarly, if you ask this in the Immediate Window:
? TypeName(acNavigationCategoryObjectTy)
the response is Empty, indicating it is an uninitialized variant, i.e. VBA
does not recognise it as a defined constant.
So, it appears that the constants are not correctly declared for use in VBA
code.
The only way I can see that you can call them programatically at this point
would be RunMacro.
--
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.
"JamesJ" <jjy@darwin_roadrunner.com> wrote in message
news:7109ADD5-9D9A-4F92-AA4F-(E-Mail Removed)...
>2 thing of interest here. This is apparently wrong 'cause I'm getting a
>compile error:
> DoCmd.NavigateTo([Custom], [Data01]) Expected =
>
> 1) While I type it in the Auto Data Tips (I think that's what it is
> called)
> is Showing the following:
> DoCmd.NavigateTo([Category], [Group])
>
> 2) When I do vb help for the NavigateTo Method it's example is:
> DoCmd.NavigateTo(Category, Group) minus the brackets being
> shown in the Auto Data Tips.
>
> What is the proper sysntax? The Category is Custom and the Group is
> Data01.
>
> Thanks,
> James