Link to home
Start Free TrialLog in
Avatar of Bowser2000
Bowser2000

asked on

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
Avatar of BrianWren
BrianWren

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

should be
CurrentDb.synchronize "C:\citi\40\citi40.mdb", dbRepImportChanges      
Avatar of Bowser2000

ASKER

The above comment did not work, same error.
Thanks
Art
-----------------------------------------------------------------------

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
Using the above code, I get a compile error saying "Database" is a user defined type not defined.  HELP!!!
Thanks,
Art
ASKER CERTIFIED SOLUTION
Avatar of BrianWren
BrianWren

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial