Results 1 to 4 of 4

Thread: Link

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Apr 2003
    Location
    The Future - Skynet
    Posts
    1,157

    Link

    Is there a way to create SQL link in Access using VBA?
    Last edited by Liquid Metal; May 1st, 2003 at 01:08 PM.
    I'll Be Back!

    T-1000

    Microsoft .Net 2005
    Microsoft Visual Basic 6
    Prefer using API

  2. #2
    Let me in .. techyspecy's Avatar
    Join Date
    Aug 2002
    Location
    Back to VBF.
    Posts
    2,456

    Re: Link

    Originally posted by Liquid Metal
    Is there a way to create SQL link in Access?
    Yes just right click in access db and select data links ... then use a sql provider and specify the destination.

  3. #3

    Thread Starter
    Frenzied Member
    Join Date
    Apr 2003
    Location
    The Future - Skynet
    Posts
    1,157
    I know how to do that. I was referring to do it with VBA.
    I'll Be Back!

    T-1000

    Microsoft .Net 2005
    Microsoft Visual Basic 6
    Prefer using API

  4. #4

    Thread Starter
    Frenzied Member
    Join Date
    Apr 2003
    Location
    The Future - Skynet
    Posts
    1,157

    Thanks anyway Techyspecy

    Here is the solution.
    Code:
        DoCmd.RunSQL ("DROP TABLE TestTable1")
        DoCmd.SetWarnings False
        DoCmd.TransferDatabase acLink, "ODBC Database", "ODBC;DSN=LocalServer;DATABASE=Test", acTable, "Table1", "TestTable1"
        DoCmd.SetWarnings True
    I'll Be Back!

    T-1000

    Microsoft .Net 2005
    Microsoft Visual Basic 6
    Prefer using API

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