L
Leftyleolady
I am using code/form from "Access Programming 2000 for Dummies" to link table
from an SQL server to Access db. I have Doug Steele's and Joe Fallon's code
on this from previous answers to questions, which is a little beyond me
(conceptwise) at this time. I would like to understand the particulars
first. Okay, I am getting to the question...
I cannot get the below code to work... Can someone help me out. I get
either a Runtime 3421 data type conversion, or 3734 Database has been placed
in state, etc. I have referenced DAO 3.6 library and open database
exclusively, with no luck. I also went to the website and downloaded updates
to no avail.
Private Sub Command2_Click()
Dim Lnk As TableDef
Set Lnk = CurrentDb.CreateTableDef(Mid(Me.List0, 10))
Lnk.SourceTableName = Mid(Me.List0, 10)
Lnk.Connect = "ODBC;DSN=MSAToSQL;UID=ID;PWD=password"
CurrentDb.TableDefs.Append Lnk
DoCmd.OpenTable Mid(Me.List0, 10)
End Sub
Thanks in advance!
from an SQL server to Access db. I have Doug Steele's and Joe Fallon's code
on this from previous answers to questions, which is a little beyond me
(conceptwise) at this time. I would like to understand the particulars
first. Okay, I am getting to the question...
I cannot get the below code to work... Can someone help me out. I get
either a Runtime 3421 data type conversion, or 3734 Database has been placed
in state, etc. I have referenced DAO 3.6 library and open database
exclusively, with no luck. I also went to the website and downloaded updates
to no avail.
Private Sub Command2_Click()
Dim Lnk As TableDef
Set Lnk = CurrentDb.CreateTableDef(Mid(Me.List0, 10))
Lnk.SourceTableName = Mid(Me.List0, 10)
Lnk.Connect = "ODBC;DSN=MSAToSQL;UID=ID;PWD=password"
CurrentDb.TableDefs.Append Lnk
DoCmd.OpenTable Mid(Me.List0, 10)
End Sub
Thanks in advance!