none
Query Selected Tables RRS feed

  • Question

  • Hello,

    I need to get the names of the selected tables on the navigation pane.

    For example, if I have a database with tables "Table1, Table2, Table3" and I select Table1 and Table2 from the list of Access objects, I would like to get the names "Table1" and "Table2".

    I would prefer a solution using Interop but VBA is also an option.

    Thanks

    Wednesday, November 15, 2017 3:15 PM

All replies

  • That's a tricky one.  If no object is actually open, you can get *one* of the selected tables in the nav pane by interrogating Application.CurrentObjectName, but you can't get to a list or collection of objects.

    *Maybe* you could get at this via the Windows API, locating the navigation pane window and working downward from there.


    Dirk Goldgar, MS Access MVP
    Access tips: www.datagnostics.com/tips.html

    Wednesday, November 15, 2017 6:01 PM
  • Hello,

    As far as I know, Access does not provide any property or method to do this work. I tried to search but failed to find any document which indicates anyway to do this. Hope somebody could give an excellent solution.

    Thanks for understanding.

    Best Regards,

    Terry


    MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Thursday, November 16, 2017 8:36 AM
  • I need to get the names of the selected tables on the navigation pane.

    Hi wk... ,

    I am still a A2003 user, with negligable experience with the navigation pane. How must I imagine the selection you want to do.

    In all my applications I use a (meta data) table to store information about the tables, including it's name, and it would not be a problem to make any cross-section through the tables.

    Imb.

    Thursday, November 16, 2017 2:13 PM