[AccessD] Search many mdbs for a linked table
Stuart McLachlan
stuart at lexacorp.com.pg
Wed Apr 29 20:58:55 CDT 2020
Step through the databas naes with DIR and use this one each one in turn?
Function LinkExists(SOurceDB As String, SourceTable As String, DB As String) As Boolean
On Error Resume Next
DoCmd.DeleteObject acTable, "Test"
On Error GoTo 0
DoCmd.TransferDatabase acLink, , DB, acTable, "MSysOBjects", "Test"
If DCount("*", "Test", "Database = '" & SOurceDB & "' AND ForeignName = '" & SourceTable
& "'") > 0 Then
LinkExist = True
End If
End Function
On 29 Apr 2020 at 17:32, David McAfee wrote:
> Does anyone know if it is possible to search a directory of access
> mdbs/accdbs to look for one the has a certain linked table in it?
> Trying to find one that has a linked table named "tbl ServExhibit"?
>
> Is that possible?
> --
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
More information about the AccessD
mailing list