UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
 
   Reply to this topicStart new topic
> Selected Table Name, Access 2013    
 
   
AshJT
post Oct 18 2019, 05:41 AM
Post#1



Posts: 42
Joined: 4-June 08



Hi

I want to run a some code from a module on the currently selected (highlighted) table. It may or may not be open, I'm just trying to find whatevere is selected in the navigation pane.

Is this possible?

Thanks!

EDIT: no worries, just found it:

CODE
Application.CurrentObjectName


(need to check Application.CurrentObjectType = acTable to make sure it's a table!)

This post has been edited by AshJT: Oct 18 2019, 05:58 AM
Go to the top of the page
 
June7
post Oct 18 2019, 05:57 AM
Post#2



Posts: 974
Joined: 25-January 16



Why would you need to program something like this? Users should not interact directly with tables and queries.

I am not aware of any way to do this.

--------------------
Attachments Manager is below the edit post window. To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
DEBUG! DEBUG! DEBUG! http://www.cpearson.com/Excel/DebuggingVBA.aspx
Go to the top of the page
 
AshJT
post Oct 18 2019, 06:25 AM
Post#3



Posts: 42
Joined: 4-June 08



Oh, it's just something for me to use only - I run a bit of code that finds a couple of records and dislays them in a query. It's just a short-cut for me. thumbup.gif
Go to the top of the page
 
June7
post Oct 18 2019, 06:33 AM
Post#4



Posts: 974
Joined: 25-January 16



Okay, glad you found it.

--------------------
Attachments Manager is below the edit post window. To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
DEBUG! DEBUG! DEBUG! http://www.cpearson.com/Excel/DebuggingVBA.aspx
Go to the top of the page
 


Custom Search


RSSSearch   Top   Lo-Fi    22nd November 2019 - 09:19 PM