V
Vinod
Hi All,
Please help me on how to create a new table in MS Access 2003 using a
select query which retrives data from external database (SQL Server 2005).
My present code looks as follows:
sub CopyToNewTable()
Dim qdfPass As DAO.QueryDef
Dim strSqlQry As String, strConn As String
strConn="ODBC;DRIVER={SQL
Server};SERVER=PERSONAL-4B2723\SQLEXPRESS;DATABASE=emp;Trusted_Connection"
strSqlQry = "Select * Into tblTemp From emp In '" & strConn & "'"
currentdb.execute(strSqlQry);
end sub
After ran the above procedure 'tblTemp' table is created in SQL Server 2005.
But as per my requirement it needs to be created 'tblTemp' table in MS
Access DB where the sub procedure is running.
Please help me out by sharing your thoughts and ideas on resolving above
said issue in creating new table in local database.
Advanced Thanks
~Vins
Please help me on how to create a new table in MS Access 2003 using a
select query which retrives data from external database (SQL Server 2005).
My present code looks as follows:
sub CopyToNewTable()
Dim qdfPass As DAO.QueryDef
Dim strSqlQry As String, strConn As String
strConn="ODBC;DRIVER={SQL
Server};SERVER=PERSONAL-4B2723\SQLEXPRESS;DATABASE=emp;Trusted_Connection"
strSqlQry = "Select * Into tblTemp From emp In '" & strConn & "'"
currentdb.execute(strSqlQry);
end sub
After ran the above procedure 'tblTemp' table is created in SQL Server 2005.
But as per my requirement it needs to be created 'tblTemp' table in MS
Access DB where the sub procedure is running.
Please help me out by sharing your thoughts and ideas on resolving above
said issue in creating new table in local database.
Advanced Thanks
~Vins