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?
 
BrianWrenConnect With a Mentor Commented:
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
 
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
All Courses

From novice to tech pro — start learning today.