GlenLynam
MIS
- Jul 26, 2002
- 121
Afternoon,
I am trying to complete an app i have been writing if you can assist please do. Im creating an mde that will connect to another database and auto import the data into it via a csv.
I have created the cobbection as follows and this appears to work.
Private Sub Form_Load()
Dim conn As ADODB.Connection
Set conn = New ADODB.Connection
With conn
.Provider = "Microsoft.Jet.OLEDB.4.0"
.ConnectionString = "data source=C:\calllogger2002.mdb"
.Open
End With
End Sub
The problem im gettin is that i cant get my code to do anything on the other access database.This is the code i am using (it does work if i use it in he actual database)
DoCmd.SetWarnings False
DoCmd.OpenQuery "DeleteImportTableContents"
DoCmd.TransferText acImportDelim, , "IMPORT", "C:\Program Files\Avaya\IP office\CCC\DeltaServer\SMDR_Output\smdr.csv", True
DoCmd.OpenQuery "UpdateSMDRFromImport"
DoCmd.DeleteObject acTable, "SMDR_ImportErrors"
DoCmd.SetWarnings True
DoCmd.Quit
Basically i want to execute this code on the original database from a completely seperate MDE file.
Thanks
Glen
I am trying to complete an app i have been writing if you can assist please do. Im creating an mde that will connect to another database and auto import the data into it via a csv.
I have created the cobbection as follows and this appears to work.
Private Sub Form_Load()
Dim conn As ADODB.Connection
Set conn = New ADODB.Connection
With conn
.Provider = "Microsoft.Jet.OLEDB.4.0"
.ConnectionString = "data source=C:\calllogger2002.mdb"
.Open
End With
End Sub
The problem im gettin is that i cant get my code to do anything on the other access database.This is the code i am using (it does work if i use it in he actual database)
DoCmd.SetWarnings False
DoCmd.OpenQuery "DeleteImportTableContents"
DoCmd.TransferText acImportDelim, , "IMPORT", "C:\Program Files\Avaya\IP office\CCC\DeltaServer\SMDR_Output\smdr.csv", True
DoCmd.OpenQuery "UpdateSMDRFromImport"
DoCmd.DeleteObject acTable, "SMDR_ImportErrors"
DoCmd.SetWarnings True
DoCmd.Quit
Basically i want to execute this code on the original database from a completely seperate MDE file.
Thanks
Glen