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
Bowser2000Asked:
Who is Participating?

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

x
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.

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

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

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

Try:

  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...
)

Brian
0
Bowser2000Author Commented:
Using the above code, I get a compile error saying "Database" is a user defined type not defined.  HELP!!!
Thanks,
Art
0
BrianWrenCommented:
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".

Brian
0

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.