Results 1 to 5 of 5
  1. #1
    trotta is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Feb 2013
    Location
    MN, USA
    Posts
    1

    Automating import and export


    I am fairly new to Access. I know this is easy but I do not know where to start.
    I would like to automate this daily process: In this order import or link, (not sure which is the best option) a fixed width table, add an ascending number to the end of each of the records, reverse the order, and finally export to fixed width .txt documents depending on the quantities in one field. There would be 3 text files exported, max.

    Thank you for the help.

    T.

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,895
    Not exactly easy and depends on what you mean be 'automate'. Some event must occur to trigger code - like a button click or form open.

    Import the data to a table with an autonumber field. This will generate the sequential number.

    Review http://msdn.microsoft.com/en-us/libr.../ff835958.aspx
    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.

  3. #3
    redbull's Avatar
    redbull is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Mar 2012
    Location
    Missouri
    Posts
    480
    If you can make the import routine or macro or HOWEVER your going to do the import... then you can put a macro in the scheduled tasks section of windows to fire off the automation at a specific time. I have a couple machines that run a wide array of things automatically at specific times and this is how I handle it.

  4. #4
    redbull's Avatar
    redbull is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Mar 2012
    Location
    Missouri
    Posts
    480
    If your going to be doing it from VBA and not within macros etc etc... Then you can use a batch file to open your database.. have the database open a form on load, (Datebase tools ~> startup) THEN>>>>> on form load, you put your import etc etc etc....


    In the scheduled tasks section you write a batch file like this...

    @echo off
    start MSACCESS.exe "C:\FILEPATH TO DATABASE.mdb"

    Have that batch fire off.. and kaboom your done.

  5. #5
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,895
    I also use a batch file (VBScript) that Windows Task Manager runs according to schedule. The script closes all instances of Access application then opens my db. A form opens by default when db opens and code behind that form's Open event immediately executes.
    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. SendObject Export CSV and Import CSV
    By DetrieZ in forum Import/Export Data
    Replies: 2
    Last Post: 09-19-2012, 04:52 PM
  2. Outlook Export Import Access
    By turk in forum Access
    Replies: 4
    Last Post: 07-17-2012, 07:31 AM
  3. export/import by email
    By sue tang in forum Import/Export Data
    Replies: 5
    Last Post: 03-14-2012, 04:41 PM
  4. Replies: 5
    Last Post: 10-28-2011, 12:20 PM
  5. Export / Import situation
    By svcghost in forum Import/Export Data
    Replies: 7
    Last Post: 10-14-2010, 04:23 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