Results 1 to 2 of 2
  1. #1
    mike02 is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jun 2012
    Posts
    245

    Import form

    I have posted in the forms tab for my import form. but then i saw this tab and it would be a better spot. I have completely redesigned my form from what i previous said. I figured it was to complex for the amount of importing to be done at once. I figured i might as well do it one table at a time. much easier. so i have set up my form like this:

    .........cbobox select table..... ...button refreshtablelist.....



    ..checkbox.. excel
    ..checkbox.. txtfile



    ...........txtbox........ ...buttongetfile...

    ..button..import...

    So i want to select a table to append to in my combo box then select excel or txt file im importing and the select my file. the file path wil lgo into the txt box.
    then i click import and the magic happens.. but i dont know how to write the code to do thimporting based on the two cases. now i have attached a same db with the form for you to look at. The tables fnction i call upon gets tables and queries. is there way to make it get just tables? I have also set up the code to best of my ability to what i think should be the right steps, but i dont know where to start with the code. I would like to aviod appending queries and do it all in one go rather then making dummy tables then making appending Attachment 8678

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,626
    To get only table names try a RowSource sql:
    SELECT MSysNameMap.Name, MSysNameMap.Type
    FROM MSysNameMap
    WHERE (((MSysNameMap.Type)=1));

    Suggest you eliminate the Get Table List button and populate the combobox RowSource when the form opens. Also, code to make sure one of the radio buttons is checked before running the GetFile function.

    Your GetFile function errors on the line that calls ahtAddFilterItem. Missing code. Review http://access.mvps.org/access/api/api0001.htm
    Also, the strFilter variable in the function call needs to be different. Look carefully at the example.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Import form
    By mike02 in forum Forms
    Replies: 7
    Last Post: 07-30-2012, 03:14 PM
  2. Import Word Docs as Form Template
    By Spectre50 in forum Forms
    Replies: 0
    Last Post: 03-05-2012, 01:51 PM
  3. Acces 2003: Import Form
    By compooper in forum Import/Export Data
    Replies: 4
    Last Post: 06-22-2011, 02:51 PM
  4. import excel into form with combobox fields
    By MyWebdots in forum Import/Export Data
    Replies: 2
    Last Post: 08-09-2010, 02:35 AM
  5. Import value from one form to another
    By vCallNSPF in forum Forms
    Replies: 1
    Last Post: 01-13-2010, 05:49 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums