Access synchronization

  • Breakdown:

    2 Databases

    One access database on a mobile laptop the second on a network drive.

    When the laptop is the connected back to the network can a macro be ran to place the gathered records into the 'networked' database without getting dups?

    I dont think this will be an issue, but my real problem is I dont know where to start - Would you write some VB to implement this or just write a macro that runs some SQL steps to push this information out to the 'networked' database.

  • To use the famous catch-cry,

    it depends

    (on your personal preferences) ... I tend to avoid using macros in Access (I just don't like them), preferring to write VB code instead.

    A simple push to the network should be pretty straight forward, and a macro would be fine. You may still need some VB code - eg: if you want to try and detect a network connection automatically, or simply have the user click on a synchronise button.

    The actual updates to the network database should be possible using append queries - at least for new records. If you need to modify/delete too, that might be a bit more involved.

    It also depends on just how smart you want the push to be ... eg: if you want to do some other audit/validation processing, like checking which new records were added to the network, purging the successful one, and reporting the errors/exceptions, then you may need a mixture of macros, queries, and VB.

    Chris

  • Hello,

    You might want to consider replication. Access has in-built functionality to handle situations like this, but it does require some planning before going down this route.

    You should find some good information on

    http://www.access-programmers.co.uk/forums/

    HTH

    K.

  • I agree with Karma, replication is the best choice for syncing two Access databases without writing any code.

    The downsides:

    Replication adds system tables & fields to your database, so the file size increases by 30-50%

    Design changes can only be made in the design master, not in the replica (but that might be OK for your purposes).

    The new .accdb format starting with Access 2007 does not support replication - you need to stay with the .mdb format which 2007 does support.

    Any autonumber fields are changed from Increment to Random, so if your app depends on autonumbers being sequential then you can't use replication.

    Microsoft recommends that you do not use relationships having referential integrity in a replicated system - because synchronization might not insert new records in the correct order to enforce RI.

    Deleting records may actually make the file bigger, because the sync process needs to track record deletions & that consumes space.

    Personally I would use manual sync, not automatic, because you can have problems if both files are open during a sync.

  • Thanks for the replies guys.

    What versions support this built-in replication process?

    Or is this something that was just introduced in 2007?

  • Replication goes all the way back to at least Access 97, don't remember if 2.0 or 95 had it.

  • Excellent, thanks I will start looking into it ASAP.

    🙂

Viewing 7 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic. Login to reply