Replication via code

I am trying to get my application to synchronize on load, I have a split database and only want to sync. the front end. I have tthe following code in a onload of my logon form, but I get an error that says incorrect use of synchronize function, any ideas?

CurrentDb.synchronize "C:\citi\40\citi40.mdb", dbRepImpchanges
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

CurrentDb.synchronize "C:\citi\40\citi40.mdb", dbRepImpchanges

should be
CurrentDb.synchronize "C:\citi\40\citi40.mdb", dbRepImportChanges      
Bowser2000Author Commented:
The above comment did not work, same error.

Some things that LOOK like they'll work with the CurrentDB actually need a database object to work with.


  Dim d as Database
  Set d = CurrentDB

  d.synchronize "C:\citi\40\citi40.mdb", dbRepImportChanges

( An example is:
    Dim t as tabledef
    set t = CurrentDB.TableDefs("Name")

  Compiles great, just doesn't run...

Bowser2000Author Commented:
Using the above code, I get a compile error saying "Database" is a user defined type not defined.  HELP!!!
That is a big problem!

The type, "Database", is defined in:

 Microsoft DAO 3.51 Object Library

"dbRepImportChanges" is also defined in the DAO referenced library.

You need to make sure your reference to that library is intact.  It is found in dao350.dll.

In a module desing window, select the menu Tools|References.  Look for "Microsoft DAO 3.51 Object Library".  If it is not there, you will need to Browse for it.

The same is true if it is shown, but has "Missing" beside it.  Make sure that its check box is "checked".


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.