Visual Basic Code to link Sql 2000 table to Access

  • I'm looking for visual basic code that will link a sql server 2000 table to an Access database. Is this possible to do?

  • Where is the VB code supposed to be running from? Are you talking VBA (VB for Application) code running from within the Access DB?

    ----------------------------------------------------------------------------------
    Your lack of planning does not constitute an emergency on my part...unless you're my manager...or a director and above...or a really loud-spoken end-user..All right - what was my emergency again?

  • Yes, I'd like to run VBA from within Access. I'm a beginner learning VBA so this will be a challenge.

  • Your best bet is to use ADOX to create link tables to SQL2000, which you can then reuse in your application.

    The MSDN sample code for this is located here:

    http://msdn2.microsoft.com/en-us/library/aa164914(office.10).aspx

    You'll need to experiment with the connection string settings for the connection into SQL2005. Provider name should be {SQL Server} or MSSQLSERVER.

    Also - make sure you get SQL2005 enabled for "remote connections" since this will fall into that category.

    ----------------------------------------------------------------------------------
    Your lack of planning does not constitute an emergency on my part...unless you're my manager...or a director and above...or a really loud-spoken end-user..All right - what was my emergency again?

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply