VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Function to Copy Tables from an Access Database to another Database. Another programming ease for A

by James Olarte (8 Submissions)
Category: Databases/Data Access/DAO/ADO
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Sat 14th December 2002
Date Added: Mon 8th February 2021
Rating: (1 Votes)

Function to Copy Tables from an Access Database to another Database. Another programming ease for ADO Programmers. Just Three(3) Arguments to

API Declarations


'You only need to supply the following:
'DBPathName - supply the correct path and name of the Target Database
'<app.path "\james.mdb">
'TargetTable - supply the TableName from the Source Database
'NewTableName - supply the New Table Name when copied to the Target Database
'Feel free to use my code with ease.

Rate Function to Copy Tables from an Access Database to another Database. Another programming ease for A



On Error GoTo ErrorHandler:
    Connection.Execute "SELECT " & TargetTable & ".* INTO " & TargetTable & " IN '" & DBPathName & "' From " & NewTableName
    Exit Sub
ErrorHandler:
    MsgBox "Error: " & Err.Description, vbCritical + vbOKOnly, "Error " & Err.Number & " in CopyTable!"
End Sub


Download this snippet    Add to My Saved Code

Function to Copy Tables from an Access Database to another Database. Another programming ease for A Comments

No comments have been posted about Function to Copy Tables from an Access Database to another Database. Another programming ease for A. Why not be the first to post a comment about Function to Copy Tables from an Access Database to another Database. Another programming ease for A.

Post your comment

Subject:
Message:
0/1000 characters