I am using windows sceduler to schedule a synchronize between two offices at
night.
I have a function that runs db.Synchronize which is called from a form that
first allows the user to cancel the sync if they dont want it (ex. if I open
the back end to work with...). But my form has corrupted itself many times,
and I need to recerate it agian.... should I just call the function from an
autoexec macro and not worry about opening the BE just use the shift bypass
key to stop the code. Or is there another way?
Function replication()
Dim db As DAO.Database
Set db = DBEngine(0)(0)
Dim domainname As String
Dim res As String
domainname = fUserNTDomain()
If domainname = "XXXXXX" Then
db.Synchronize "XXXXXX", dbRepImpExpChanges
Else
res = MsgBox("You are not the Data Master, would you like to replicate
with the Data Master?", vbYesNo)
If res = vbYes Then
db.Synchronize "XXXXXX", dbRepImpExpChanges
Else
Application.Quit acQuitSaveAll
End If
End If
Debug.Print Err.Number
If Err.Number = 0 Then
Application.Quit acQuitSaveAll
Else
strErrNum = Err.Number
strErrDesc = Err.Description & " in job_form Form_Current"
MsgBox "An error has occured." & Err.Number & " (" & Err.Description &
")."
End If
End Function
Thanks
Todd
[Non-text portions of this message have been removed]
------------------------ Yahoo! Groups Sponsor --------------------~-->
Get Bzzzy! (real tools to help you find a job). Welcome to the Sweet Life.
http://us.click.yahoo.com/KIlPFB/vlQLAA/TtwFAA/q7folB/TM
--------------------------------------------------------------------~->
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/ms_access/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/