K
Kou Vang
I am trying to transfer one table from one access DB to another. I keep
getting an error at the final Destination criteria of the command call. It
says that "H:\LakeStorageDB.mdb" is not a valid name. Here is my code"
Option Explicit
Dim dlgOpen As FileDialog
Dim sPath As String
Set dlgOpen = Application.FileDialog(msoFileDialogFilePicker)
With dlgOpen
If .Show = -1 Then
'Step through each string in the FileDialogSelectedItems
collection
For Each vrtSelectedItem In .SelectedItems
sPath = vrtSelectedItem
Debug.Print sPath 'Prints sPath = H:\LakeStorageDB.mdb
Next vrtSelectedItem
Else
End If
End With
DoCmd.TransferDatabase acExport, "Microsoft Access",
"C:\temp\LakeDBproj.mdb", acTable, "LakeInfoObserv", sPath
Thanks,
Kou
getting an error at the final Destination criteria of the command call. It
says that "H:\LakeStorageDB.mdb" is not a valid name. Here is my code"
Option Explicit
Dim dlgOpen As FileDialog
Dim sPath As String
Set dlgOpen = Application.FileDialog(msoFileDialogFilePicker)
With dlgOpen
If .Show = -1 Then
'Step through each string in the FileDialogSelectedItems
collection
For Each vrtSelectedItem In .SelectedItems
sPath = vrtSelectedItem
Debug.Print sPath 'Prints sPath = H:\LakeStorageDB.mdb
Next vrtSelectedItem
Else
End If
End With
DoCmd.TransferDatabase acExport, "Microsoft Access",
"C:\temp\LakeDBproj.mdb", acTable, "LakeInfoObserv", sPath
Thanks,
Kou