• Import Tables (97)

    Author
    Topic
    #368341

    Hope there is a solution to this.

    I am preparing to make my application a runtime version. In the startup options I removed all menu’s, shortcuts, etc. However, I want 1 option to remain, the ability to import tables. What do I need to do to accomplish this?

    I would prefer to do this using code behind a cmdbutton with the it’s properties set to transparent. This cmdbutton would only be used by certian people. Does anyone have any suggestions?

    Thanks

    Viewing 2 reply threads
    Author
    Replies
    • #576863

      As far as I know, the menu command for importing tables is not available in Runtime Access. You’ll have to write your own code/macros to import the desired table(s). This will be much easier if the table names and data types are consistent.

      You might consider using the API to call the Open/Save As Dialog to give the user the option of choosing the filename and location. You can find this on The Access Web.

      As for your transparent commandbuttons, I would instead use the Visible property. A transparent button can still be clicked if the user finds it.

      HTH salute

    • #576869

      You wouldn’t real specific about the requirements, so I can only suggest some possibilities. You can do this through code, using one of the “Transfer” methods of DoCmd (ex: DoCmd.TransferText). You could ask the user for the textfile to be imported, and the tablename to use.

      • #576879

        Thanks to both of you. Actually what I’m trying to accomplish is a mixture of both suggestions.

        When clicked, I would like to IMPORT Table dialog box to appear and let the user select the db and tables of his/her choice.

        Hope that helps.

        Thanks again

    • #576883

      Roberta,
      Here is a small sample DB that has the open dialog API example for you.

      • #576886

        Thanks for the sample, I know I will use this at another point and time. However, for this particular situation, I’m trying to find a way for the IMPORT table dialog to appear which would allow the user to select the path, db, and table to import.

        Again, thanks for the suggestion.

        • #576902

          Roberta,
          I misunderstood what you wanted
          Here is a re-do of the db.
          This will do what you want
          Scott

          • #576913

            THANK YOU SOOOOOO MUCH!!!!!

            Works great…many many thanks

            I found this along the way also…thought I would pass it on….DoCmd.RunCommand acCmdImport…small, sweet and does that same thing…..

    Viewing 2 reply threads
    Reply To: Import Tables (97)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: