Consulting

Results 1 to 4 of 4

Thread: Automatic data exporting from one Access file to another

  1. #1
    VBAX Regular
    Joined
    May 2005
    Location
    Tallinn
    Posts
    26
    Location

    Automatic data exporting from one Access file to another

    Hi!
    Can someone please help me in next problem:

    I have two Access files. Let us name them A and B
    I am filling A with data (3 tables) from Excel (with ADO).
    The structure of these tables are the same for files A and B.

    I have to export (in each morning for example or
    by some another event) new data from file A to B automatically
    (each table in file A has field "Export" and when data has not yet exported to B the value of "Export" is "No"; After exporting the data the value of the field "Export" will be "Yes").
    How can I export the data with VBA automatically from file A to B when
    some event occures?

    J?ri.

  2. #2
    VBAX Expert xCav8r's Avatar
    Joined
    May 2005
    Location
    Minneapolis, MN, USA
    Posts
    912
    Location
    You can use ADO or DAO to read and write from A to B when some event occurs.

    http://msdn.microsoft.com/library/de...sdatabases.asp

  3. #3
    VBAX Regular
    Joined
    May 2005
    Location
    Tallinn
    Posts
    26
    Location

    Re:

    Thank You.
    Can You please specify, how i can make a procedure for event?
    For example, my procedure will be executed each morning at 8.30 without
    opening Access file?

    J?ri.

  4. #4
    VBAX Expert xCav8r's Avatar
    Joined
    May 2005
    Location
    Minneapolis, MN, USA
    Posts
    912
    Location
    The simplest solution would be to use the task scheduler to open your your database at 8.30 which contains an autoexec macro that exports the data and then closes when it's done. If you really don't want to open it, you could use VBS and ADO/DAO to transfer the data, but you'd need to run that via the task scheduler as well. My recommendation, however, is to go the VBA route since it's easier.

Posting Permissions

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