Share via

linked table manager command

Anonymous
2012-12-11T14:27:59+00:00

I know they is a way to do this as have seen it before on databases, but my knowledge doesn’t go as far as creating a command button function for it.  Able to create the more simpler commands but this may go beyond my limitations, but always willing to learn from help given.

I have about 50 imported tables from Excel and rather than using the ‘external data’, ‘linked table manager’, I what to have within my current menu a command button that once clicked a list of all imported files pops up and you can select and update the relevant files required (basically the same options as the linked table manager pop up).  Or is there a better route?

Can someone help?

Thanks

Microsoft 365 and Office | Access | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

Answer accepted by question author

ScottGem 68,830 Reputation points Volunteer Moderator
2012-12-11T17:38:05+00:00

Why not just create a button that runs Linked Table Manager?

DoCmd.RunCommand acCmdLinkedTableManager

Was this answer helpful?

0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Anonymous
    2012-12-11T18:18:05+00:00

    It sounds as though you are talking about linked rather than importedtables.  If so you could create a dialogue form with a list box, lstLinkedTables say.  Add the following function to the form's module:

    Private Function GetLinks(ctrl As Control)

        Dim tdf As DAO.TableDef

        ctrl.RowSourceType = "Value List"

        For Each tdf In CurrentDb.TableDefs

            If tdf.Connect <> "" Then

                ctrl.AddItem tdf.Name

            End If

        Next tdf

    End Function

    and in the form's open event procedure put:

       GetLinks Me.lstLinkedTables

    Open the form in dialogue mode from a button on some other form.  The list box will list all linked tables.  If you only want to list those linked to Excel files and not to any other file type, amend the code to:

        If InStr(tdf.Connect, "Excel") <> 0 Then

    This assumes that no other non-Excel files to which you have linked contains the word 'Excel' in the file name of course.

    Was this answer helpful?

    0 comments No comments