Question : How do I replace RunCommand acCmdImport in Access 2007?

In a form I need the code for a button (on click) to import an Excel file or a text file into a table name "Summary". The acCmdImport worked fine in Access 2003 because it allowed me to browse for the file and select the file type.  Please provide a solution.  Thank you.
Code Snippet:
1:
2:
3:
4:
5:
My previous code:
Private Sub ImportTable_Click()
On Error Resume Next
RunCommand acCmdImport
End Sub

Answer : How do I replace RunCommand acCmdImport in Access 2007?

Private Sub ImportTable_Click()
On Error Resume Next
DoCmd.RunCommand acCmdImport
End Sub
Random Solutions  
 
programming4us programming4us