Hey guys, using this code:
Does anyone know what changes I need to make to this so that the table overites the existing table when used more than once?
Cheers!
Dim strUser As String
Dim strWorksheet As String
strUser = Environ("Username")
strWorksheet = "STATEMENT"
'Instantiate the connection object and specify connection properties
Set oCon = CreateObject("adodb.connection")
oCon.Provider = "Microsoft.ACE.OLEDB.12.0"
'Open the connection
oCon.Open "C:\data\database.mdb"
'The spreadsheet data starts on the 7th row,
'so ignore the previous 6 rows by starting on the 7th
Dim IntRow As Integer
IntRow = 1
strSql = "CREATE TABLE" & " " & strUser & " " _
& "(Client_name CHAR);"
Debug.Print (strSql)
'Execute the sql command
oCon.Execute strSql
oCon.Close
Set oCon = Nothing
Does anyone know what changes I need to make to this so that the table overites the existing table when used more than once?
Cheers!