Results 1 to 5 of 5
  1. #1
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Office 365
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,946

    TIP: Drag & Drop with Database Objects

    I first wrote about this back in Jan 2018 at another forum



    It appears that the following info is not widely known, even amongst experienced developers, so I'm mentioning it again in other places.
    In fact, after hearing about it from me, Mike Wolfe has just written an article on the subject Hidden Feature: Drag and Drop Access Objects Between Files (nolongerset.com).

    After almost 20 years using Access, it amazes me that I still find out new things all the time...

    1. Transfer objects between databases using drag & drop

    In the past, whenever I wanted to copy objects to a new database, I always did so by importing or exporting using the usual methods

    By chance, a few years ago I discovered you can drag & drop as well! MUCH easier...!
    Holding down shift & control allow multi-select in the usual way

    This method allows you to drag and drop any object from the navigation pane of one database to another

    The only drawback I can see is that linked tables in the source database become local tables in the destination database....which may not be what you want.
    Holding down Ctrl or Alt or Shift etc has no effect on this behaviour. A work-round to this is available but it is far from intuitive....

    Drag the linked table(s) across to the other database a second time. This time Access will ask you what to do with the table(s) ...select linked table and the local table will be replaced by a linked table.

    If this is also a "well I never knew that " moment for you, do have a look at the attached video which show this in use - not quite Oscar winning standard on this occasion

    And if the rest of you already knew you could do this ... perhaps it just proves how little I really know

    2. Access object shortcuts

    On a similar theme, if you drag any Access object such as a table onto the desktop, a shortcut is created in the desktop. The table shortcut will have a suffix .MAT
    When the shortcut is double clicked, the database opens directly to the table.
    Or you can right click to open in design view etc.

    This feature works for any Access object e.g. form shortcut .MAF, query .MAQ, report .MAR, module .MAD etc. In fact there are 10 different shortcut types as shown below (plus a rather strange file type .MAU)

    Click image for larger version. 

Name:	AccessShortcuts.PNG 
Views:	48 
Size:	72.9 KB 
ID:	46824


    I've no idea what the diagram object is that would give a .MAG shortcut ...nor do I know what a .MAU file is
    Personally, the only time I’ve ever found this shortcut feature useful is for quick access to items in a DEMO session


    Attached Files Attached Files
    Colin, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I don't know, I keep quiet!
    If I don't know that I don't know, I don't know whether to answer

  2. #2
    davegri's Avatar
    davegri is online now Excess Access
    Windows 10 Access 2016
    Join Date
    May 2012
    Location
    Denver
    Posts
    3,381
    I knew about dragging to the desktop to create shortcut, but not about Nav pane to Nav pane. That is much simpler than the traditional import/export. Many thanks for the tip!

  3. #3
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Office 365
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,946
    You're welcome.
    Having checked in various old versions of Access, both features have been available since Access 97...24 years ago.
    Yet it seems practically nobody knew about drag and drop from one database to another...despite it being really useful.

    I've just uploaded a video on this topic to You Tube:

    Colin, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I don't know, I keep quiet!
    If I don't know that I don't know, I don't know whether to answer

  4. #4
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,387
    only problem with dragging and dropping tables is the relationships are not copied over - Not aware of a way to do this, other than by importing

  5. #5
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Office 365
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,946
    Since publicising this in various places, I've read several comments such as it doesn't work if objects are open or the database isn't fully compiled
    I've used this feature numerous times over the past 4 years and retested again today and am unable to replicate either issue

    Quote Originally Posted by Ajax View Post
    only problem with dragging and dropping tables is the relationships are not copied over - Not aware of a way to do this, other than by importing
    Now that is a very good point. I don't know of a way around that either.
    Similarly you can't copy references from one db to another

    However another thing you CAN do using drag & drop that I forgot to mention....
    You can also drag modules from the VBE in one db to another.
    Colin, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I don't know, I keep quiet!
    If I don't know that I don't know, I don't know whether to answer

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Drag Drop in MS Access
    By moodhi in forum Access
    Replies: 0
    Last Post: 11-07-2018, 06:30 PM
  2. I would like to have a drag and drop feature!
    By Z1nkstar in forum Access
    Replies: 10
    Last Post: 05-13-2014, 10:36 AM
  3. Drag and Drop into Textbox
    By jagvent in forum Forms
    Replies: 1
    Last Post: 12-20-2010, 09:31 AM
  4. Drag and Drop Between Textboxes. Please Help!
    By kcpope in forum Programming
    Replies: 2
    Last Post: 10-19-2010, 05:03 PM
  5. Drag N Drop example between 2 listboxes
    By pkstormy in forum Code Repository
    Replies: 0
    Last Post: 08-30-2010, 10:10 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums