Results 1 to 4 of 4

Thread: [RESOLVED] Edit Link table connection string in Access

Threaded View

  1. #1

    Thread Starter
    Member
    Join Date
    Nov 2004
    Posts
    48

    [RESOLVED] Edit Link table connection string in Access

    Right i can open a dialog to select the file to link to, and i can read the connection string for the table, but i can't get the string to be altered!

    Code looks like this:

    VB Code:
    1. Private Sub Command0_Click()
    2.    
    3.     'Opens the dialog
    4.     RelinkFile
    5.     ' Old Connect String
    6.     Text1.Value = CurrentDb.TableDefs("stafflist").Connect
    7.     ' Change connect string
    8.     CurrentDb.TableDefs("staffList").Connect = "Excel 5.0;HDR=YES;IMEX=2;DATABASE=" & sFile
    9.     ' Out put the 'new' connect string
    10.     Text1.Value = CurrentDb.TableDefs("staffList").Connect
    11.     ' Check the dialog actually collected the file name/path
    12.     Text6.Value = sFile
    13.    
    14. End Sub
    Last edited by c03cg; Jul 14th, 2006 at 03:02 AM.

Posting Permissions

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



Click Here to Expand Forum to Full Width