Results 1 to 3 of 3
  1. #1
    Star Lounger
    Join Date
    Mar 2002
    Location
    Haaltert, Belgium
    Posts
    84
    Thanks
    0
    Thanked 0 Times in 0 Posts

    automatic launch linked table manager (2007)

    I work with linked tables.
    I want that when the db_data is moved or can not be found the "linked table manager" automatic opens to relink the tables.
    How can I do that?

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: automatic launch linked table manager (2007)

    Microsoft had an example of doing that in the Developer Solutions sample database, but it isn't available for download any more, it seems. I have attached the relevant code module in a text file.

    This is the On Load event procedure of the startup form in the database. It calls code from the module:

    Private Sub Form_Load()
    ' Check links to tables in Northwind database.
    On Error GoTo Form_Load_Error

    ' Check to see if Northwind is available.
    If CheckLinks() = False Then
    ' Try to relink the tables; if it fails, shut down Developer Solutions.
    If RelinkTables() = False Then
    DoCmd.Close acForm, "Startup"
    CloseCurrentDatabase
    End If
    End If

    Form_Load_Exit:
    Exit Sub

    Form_Load_Error:
    MsgBox Err.Description
    CloseCurrentDatabase
    Resume Form_Load_Exit
    End Sub
    Attached Files Attached Files

  3. #3
    Star Lounger
    Join Date
    Mar 2002
    Location
    Haaltert, Belgium
    Posts
    84
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: automatic launch linked table manager (2007)

    I have tested this code and it works, even for accdb files (access 2007) after adjusting it.
    Thanks a lot :-)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •