Results 1 to 8 of 8
  1. #1
    5 Star Lounger
    Join Date
    Feb 2001
    Location
    Louisville, Kentucky, USA
    Posts
    605
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Import Tables (97)

    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
    Roberta Price <img src=/S/cheers.gif border=0 alt=cheers width=30 height=16>

  2. #2
    Silver Lounger
    Join Date
    Jan 2001
    Location
    Indianapolis, Indiana, USA
    Posts
    1,862
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Import Tables (97)

    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 <img src=/S/salute.gif border=0 alt=salute width=15 height=20>

  3. #3
    Gold Lounger
    Join Date
    Jun 2001
    Location
    Crystal Beach, FL, Florida, USA
    Posts
    3,436
    Thanks
    1
    Thanked 34 Times in 34 Posts

    Re: Import Tables (97)

    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.
    Mark Liquorman
    See my website for Tips & Downloads and for my Liquorman Utilities.

  4. #4
    5 Star Lounger
    Join Date
    Feb 2001
    Location
    Louisville, Kentucky, USA
    Posts
    605
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Import Tables (97)

    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
    Roberta Price <img src=/S/cheers.gif border=0 alt=cheers width=30 height=16>

  5. #5
    3 Star Lounger
    Join Date
    Nov 2001
    Location
    Atlanta, Georgia, USA
    Posts
    274
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Import Tables (97)

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

  6. #6
    5 Star Lounger
    Join Date
    Feb 2001
    Location
    Louisville, Kentucky, USA
    Posts
    605
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Import Tables (97)

    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.
    Roberta Price <img src=/S/cheers.gif border=0 alt=cheers width=30 height=16>

  7. #7
    3 Star Lounger
    Join Date
    Nov 2001
    Location
    Atlanta, Georgia, USA
    Posts
    274
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Import Tables (97)

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

  8. #8
    5 Star Lounger
    Join Date
    Feb 2001
    Location
    Louisville, Kentucky, USA
    Posts
    605
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Import Tables (97)

    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.....
    Roberta Price <img src=/S/cheers.gif border=0 alt=cheers width=30 height=16>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •