using vba to synchronize my replica set (1 Viewer)

S

sodakjones

Guest
i have this code in the on click section of a button

Private Sub Command0_Click()
On Error GoTo Err_Command0_Click


Set dbsinventory = opendatabase("inventory.mdb")

dbsdb1.synchronize "s:\Info Systems Inventory\rinventory", dbRepImpExpChanges

MsgBox "synch done"

Exit_Command0_Click:
Exit Sub

Err_Command0_Click:
MsgBox Err.Description
Resume Exit_Command0_Click

End Sub

i get told that their is a compile error when i try to run it at the opendatabse word it tells me that the sub of function is not diefined. what am doing wrong?
 

Randomblink

The Irreverent Reverend
Local time
Today, 09:40
Joined
Jul 23, 2001
Messages
279
I think

strAppName = <insert path to the inventory.mdb here>
(eg. strAppName = "C:\My Documents\Databases\inventory.mdb")

appAccess = CreateObject ("Access.Application")
appAccess.OpenCurrentDatabase strAppName

I believe that is the code lines you are missing...
Not too sure tho...

I am working on similar and have run across that code in the help files...

Good Luck!
 

Users who are viewing this thread

Top Bottom