D
Diane, St. Louis
I know how to import a text file using a browse box, but I want to be able to
import my text file without having to manually select with import
specification I want to use. I want it to import my file smoothly and
automatically. Is that possible? Does someone have an example code?
This is the one I am currently using:
Private Sub Command13_Click()
On Error GoTo ErrHandler
DoCmd.RunCommand acCmdImport
ExitHandle:
Exit Sub
ErrHandler:
Select Case Err.Number
Case 2501
'Do nothing as cancel selected by user
Resume ExitHandle
Case Else
MsgBox Err.Number & vbCrLf & Err.Description
Resume ExitHandle
End Select
DoCmd.RunMacro "mcrQuantumImportFileExport"
End Sub
Thanks!
Diane
import my text file without having to manually select with import
specification I want to use. I want it to import my file smoothly and
automatically. Is that possible? Does someone have an example code?
This is the one I am currently using:
Private Sub Command13_Click()
On Error GoTo ErrHandler
DoCmd.RunCommand acCmdImport
ExitHandle:
Exit Sub
ErrHandler:
Select Case Err.Number
Case 2501
'Do nothing as cancel selected by user
Resume ExitHandle
Case Else
MsgBox Err.Number & vbCrLf & Err.Description
Resume ExitHandle
End Select
DoCmd.RunMacro "mcrQuantumImportFileExport"
End Sub
Thanks!
Diane