VBA code to open Import window in Access 2007

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Reedsp
    New Member
    • Apr 2007
    • 19

    VBA code to open Import window in Access 2007

    I have a Access 2000 formated database that I am testing the functionality of the database in Access 2007. One line of code of visual basic code in not working in a module. The line is:

    DoCmd.DoMenuIte m acFormBar, acFile, 2, 0, acMenuVer70

    This line opens the import window. Does anyone know the replacement code to use in Access 2007 to open the import window?
  • puppydogbuddy
    Recognized Expert Top Contributor
    • May 2007
    • 1923

    #2
    Originally posted by Reedsp
    I have a Access 2000 formated database that I am testing the functionality of the database in Access 2007. One line of code of visual basic code in not working in a module. The line is:

    DoCmd.DoMenuIte m acFormBar, acFile, 2, 0, acMenuVer70

    This line opens the import window. Does anyone know the replacement code to use in Access 2007 to open the import window?
    Most of the DoMenuItem commands are being phased out and are being replaced by DoCmd.RunComman d XXXXXX.

    Try this syntax to open the import window:

    DoCmd.RunComman d acCmdImport

    Comment

    • Reedsp
      New Member
      • Apr 2007
      • 19

      #3
      Once I typed in the syntax, a window appeared to select the import commands and the one that worked was
      DoCmd.RunComman d acCmdImportAtta chText

      Thanks for the information. I have always been able to find solutions to my questions on this site. It is a great relief.

      If this is the second reply, I'm sorry. My browser is timing out.



      Originally posted by puppydogbuddy
      Most of the DoMenuItem commands are being phased out and are being replaced by DoCmd.RunComman d XXXXXX.

      Try this syntax to open the import window:

      DoCmd.RunComman d acCmdImport

      Comment

      Working...