M
Mark
Hi,
About halfway down are the lines:
'REPLACE ORIGINAL BE WITH NEW BE (UNZIPPEDFILE)
On Error Resume Next
FileCopy UnzippedFile, OriginalPath 'e.g., C:\fpsdata.mdb to
C:\Access97\fpsdata.mdb
' *****************************************
I had originally had this as:
On Error GoTo ReplaceOriginal_err
FileCopy UnzippedFile, OriginalPath 'e.g., C:\fpsdata.mdb to
C:\Access97\fpsdata.mdb
' *****************************************
If I use On Error GoTo ReplaceOriginal_err, the code errors-out at that
point with an error description of "Permission Denied". If I use On Error
Resume Next, the code runs fine. If I look in Windows Explorer at the point
of "Permission Denied", the user's local BE is open (.ldb exists) -- which
may explain the "Permission Denied". The user's FE should be linked to
Tempdata.mdb at that point. And, in fact, if I put a breakpoint at On Error
GoTo ReplaceOriginal_err -- just before FileCopy UnzippedFile,
riginalPath -- the FE is, in fact, linked to Tempdata.mdb and the local BE
is not open (no .ldb). Must be a timing thing, I guess? -- The linking to
Tempdata.mdb has not fully completed before the next line of code (FileCopy
.... ) begins?
The setup is a LAN with all the LAN FE's linked to the BE on P-drive.
Other users bring in their laptops to update their personal BE's. Their FE's
are linked to their own C-drive.
Certain records have flags and if the FE is linked to a C-drive, the flag is
turned on when the record is changed. (If the FE is already linked to the
LAN BE, then the flag is not turned on when the record is changed). When the
user wants to update their laptop -- without losing any of their own new
records, the code first appends all their flagged records to Temp tables in
their own FE. The code then copies the LAN BE to their local C-drive, makes
a second copy of the LAN's BE - also in their C-drive, links to the first
copy, replaces their local BE (which is located in a separate folder) with
the second copy, relinks to their original BE (now replaced with the copy of
the LAN's BE) and then re-inserts their new records. There's also a
procedure they can select for transferring their new records, including
Billing Records, to the LAN's BE. Transferring Billing Records is restricted
to one time at payroll; users, however, can update the BE at anytime -- they
just don't want to lose new records that have'nt been transferred yet.
Case Is = 4 'User selected Update with Billing Records to protect
'SourceFile = "P:\fpsdata.mdb"
'UnzippedFile = "C:\fpsdata.mdb"
'TempFile = "C:\tempdata.mdb"
'OriginalPath = "C:\Access97\fpsdata.mdb"
'1. run queries to fill FE TempTables
'2. FileCopy SourceFile, UnzippedFile
'3. FileCopy UnzippedFile, TempFile
'4. Link to TempFile
'5. FileCopy UnzippedFile, OriginalPath
'6. Link to OriginalPath
'7. run queries to restore new records
Select Case GetLinkedDBName("Names")
Case Is = "C:\Access97\fpsdata.mdb"
SourceFile = "P:\fpsdata.mdb"
UnzippedFile = "C:\fpsdata.mdb"
SourceInUse = "P:\fpsdata.ldb"
TempFile = "C:\tempdata.mdb"
OriginalPath = "C:\Access97\fpsdata.mdb"
Case Is = "C:\Access97\Petedata.mdb"
SourceFile = "P:\Petedata.mdb"
UnzippedFile = "C:\Petedata.mdb"
SourceInUse = "P:\Petedata.ldb"
TempFile = "C:\tempdata.mdb"
OriginalPath = "C:\Access97\Petedata.mdb"
End Select
'CHECK FOR EMPTY STAFF NAME, START OR STOP DATES:
If IsNull(Me!StaffSelect) Then
MsgBox "PLEASE ENTER YOUR NAME."
Exit Sub
End If
If IsNull(Me!Start) Then
MsgBox "PLEASE ENTER THE START DATE FOR THE CURRENT BILLING PERIOD."
Exit Sub
End If
If IsNull(Me!Stop) Then
MsgBox "PLEASE ENTER THE STOP DATE FOR THE CURRENT BILLING PERIOD."
Exit Sub
End If
' *****************************************
'EXIT IF THE NETWORK DATABASE IS IN USE
If Len(Dir(SourceInUse)) > 0 Then
MsgBox "The network database is in use. Try again later."
Exit Sub
End If
' *****************************************
'... assuming everything's OK ...
Set dbs = CurrentDb
Set Tdfs = dbs.TableDefs
DoCmd.RunMacro "OpenfrmPleaseWait"
DoCmd.Echo False, ""
DoCmd.SetWarnings False
DoCmd.Close acForm, "frmHidden", acSaveNo
'BACKUP NEW RECORDS TO FE TEMP TABLES
On Error Resume Next
'Formerly: DoCmd.RunMacro "UpdateDatabase.Step1_HomeComp"
DoCmd.OpenQuery "QEmpty_TempDischargeSummaries", acNormal, acEdit
DoCmd.OpenQuery "QEmpty_TempAssessment1", acNormal, acEdit
DoCmd.OpenQuery "QEmpty_TempAssessment2", acNormal, acEdit
DoCmd.OpenQuery "QEmpty_TempBMPNew", acNormal, acEdit
DoCmd.OpenQuery "QEmpty_TempBMP_TBs", acNormal, acEdit
DoCmd.OpenQuery "QEmpty_TempTherapyPlans", acNormal, acEdit
DoCmd.OpenQuery "QEmpty_TempMonthlySummaries", acNormal, acEdit
DoCmd.OpenQuery "QEmpty_TempServicesProvided", acNormal, acEdit
DoCmd.OpenQuery "QEmpty_TempTxPlans", acNormal, acEdit
DoCmd.OpenQuery "QEmpty_TempTxPlans_Problems", acNormal, acEdit
DoCmd.OpenQuery "QEmpty_TempAxisI", acNormal, acEdit
DoCmd.OpenQuery "QEmpty_TempAxisII", acNormal, acEdit
DoCmd.OpenQuery "QEmpty_TempPsychEval", acNormal, acEdit
DoCmd.OpenQuery "QFillTempDischargeSummaries", acNormal, acEdit
DoCmd.OpenQuery "QFillTempAssessment1", acNormal, acEdit
DoCmd.OpenQuery "QFillTempAssessment2", acNormal, acEdit
DoCmd.OpenQuery "QFillTempBMPNew", acNormal, acEdit
DoCmd.OpenQuery "QFillTempBMP_TBs", acNormal, acEdit
DoCmd.OpenQuery "QFillTempTherapyPlans", acNormal, acEdit
DoCmd.OpenQuery "QFillTempMonthlySummaries", acNormal, acEdit
DoCmd.OpenQuery "QFillTempServicesProvided", acNormal, acEdit
DoCmd.OpenQuery "QFillTempTxPlans", acNormal, acEdit
DoCmd.OpenQuery "QFillTempTxPlans_Problems", acNormal, acEdit
DoCmd.OpenQuery "QFillTempPsychEval", acNormal, acEdit
DoCmd.OpenQuery "QFillTempAxisI", acNormal, acEdit
DoCmd.OpenQuery "QFillTempAxisII", acNormal, acEdit
' *****************************************
'COPY THE NETWORK DATABASE TO THE LOCAL C-DRIVE
On Error GoTo CopyNetworkDatabase_err
FileCopy SourceFile, UnzippedFile 'UnzippedFile = e.g., C:\fpsdata.mdb
' *****************************************
'CREATE THE TEMPFILE
On Error GoTo CreateTempFile_err
FileCopy UnzippedFile, TempFile 'TempFile = "C:\tempdata.mdb"
' *****************************************
'LINK TEMPORARILY TO "C:\tempdata.mdb"
On Error GoTo Relink_err
'Loop through the tables collection
For Each tdf In Tdfs
'...link main tables
If Len(tdf.Connect) > 0 Then
Select Case Left(tdf.SourceTableName, 4)
Case Is = "DapN"
'tdf.Connect = ";DATABASE=" & NewDapNotesPathname
'tdf.RefreshLink
Case Else
tdf.Connect = ";DATABASE=" & TempFile 'i.e.,
"C:\tempdata.mdb"
tdf.RefreshLink
End Select
End If
Next 'Goto next table
' *****************************************
'REPLACE ORIGINAL BE WITH NEW BE (UNZIPPEDFILE)
On Error Resume Next
FileCopy UnzippedFile, OriginalPath 'e.g., C:\fpsdata.mdb to
C:\Access97\fpsdata.mdb
' *****************************************
'RE-LINK TABLES
On Error GoTo Relink_err
'Loop through the tables collection
For Each tdf In Tdfs
'...link main tables
If Len(tdf.Connect) > 0 Then
Select Case Left(tdf.SourceTableName, 4)
Case Is = "DapN"
'tdf.Connect = ";DATABASE=" & NewDapNotesPathname
'tdf.RefreshLink
Case Else
tdf.Connect = ";DATABASE=" & OriginalPath
tdf.RefreshLink
End Select
End If
Next 'Goto next table
' *****************************************
'REPLACE NEW RECORDS
On Error Resume Next
'Formerly: DoCmd.RunMacro "UpdateDatabase.Step3_HomeComp"
DoCmd.OpenQuery "QUpdateMatching_DischargeSummaries", acNormal, acEdit
DoCmd.OpenQuery "QUpdateMatching_MonthlySummaries", acNormal, acEdit
DoCmd.OpenQuery "QUpdateMatching_Assessments1", acNormal, acEdit
DoCmd.OpenQuery "QUpdateMatching_Assessments2", acNormal, acEdit
DoCmd.OpenQuery "QUpdateMatching_BMPNew", acNormal, acEdit
DoCmd.OpenQuery "QUpdateMatching_BMP_TBs", acNormal, acEdit
DoCmd.OpenQuery "QUpdateMatching_TherapyPlans", acNormal, acEdit
DoCmd.OpenQuery "QUpdateMatching_TxPlans", acNormal, acEdit
DoCmd.OpenQuery "QUpdateMatching_TxPlans_Problems", acNormal, acEdit
DoCmd.OpenQuery "QUpdateMatching_PsychEval", acNormal, acEdit
DoCmd.OpenQuery "QUpdateMatching_AxisI", acNormal, acEdit
DoCmd.OpenQuery "QUpdateMatching_AxisII", acNormal, acEdit
DoCmd.OpenQuery "QAppend_DischargeSummaries", acNormal, acEdit
DoCmd.OpenQuery "QAppend_TherapyPlans", acNormal, acEdit
DoCmd.OpenQuery "QAppend_Assessments1", acNormal, acEdit
DoCmd.OpenQuery "QAppend_Assessments2", acNormal, acEdit
DoCmd.OpenQuery "QAppend_BMPNew", acNormal, acEdit
DoCmd.OpenQuery "QAppend_BMP_TBs", acNormal, acEdit
DoCmd.OpenQuery "QAppend_MonthlySummaries", acNormal, acEdit
DoCmd.OpenQuery "QAppend_ServicesProvided", acNormal, acEdit
DoCmd.OpenQuery "QAppend_TxPlans", acNormal, acEdit
DoCmd.OpenQuery "QAppend_TxPlans_Problems", acNormal, acEdit
DoCmd.OpenQuery "QAppend_PsychEval", acNormal, acEdit
DoCmd.OpenQuery "QAppend_AxisI", acNormal, acEdit
DoCmd.OpenQuery "QAppend_AxisII", acNormal, acEdit
GoTo ProcessComplete
' *****************************************
End Select 'User's selection on Frame74
' *****************************************
ProcessComplete:
Set dbs = Nothing
Set Tdfs = Nothing
Set tdf = Nothing
DoCmd.OpenForm "frmHidden", , , , , acHidden
DoCmd.Close acForm, "PleaseWait", acSaveNo
DoCmd.SetWarnings True
DoCmd.Echo True
MsgBox "Process Complete"
Exit Sub
CopyNetworkDatabase_err:
Set dbs = Nothing
Set Tdfs = Nothing
Set tdf = Nothing
DoCmd.OpenForm "frmHidden", , , , , acHidden
DoCmd.Close acForm, "PleaseWait", acSaveNo
DoCmd.SetWarnings True
DoCmd.Echo True
MsgBox "COPY THE NETWORK DATABASE TO THE LOCAL C-DRIVE -- " &
Err.Description
Exit Sub
CreateTempFile_err:
Set dbs = Nothing
Set Tdfs = Nothing
Set tdf = Nothing
DoCmd.OpenForm "frmHidden", , , , , acHidden
DoCmd.Close acForm, "PleaseWait", acSaveNo
DoCmd.SetWarnings True
DoCmd.Echo True
MsgBox "CreateTempFile_err: " & Err.Description
Exit Sub
Relink_err:
Set dbs = Nothing
Set Tdfs = Nothing
Set tdf = Nothing
DoCmd.OpenForm "frmHidden", , , , , acHidden
DoCmd.Close acForm, "PleaseWait", acSaveNo
DoCmd.SetWarnings True
DoCmd.Echo True
MsgBox "Relink_err: " & Err.Description
Exit Sub
End Sub
About halfway down are the lines:
'REPLACE ORIGINAL BE WITH NEW BE (UNZIPPEDFILE)
On Error Resume Next
FileCopy UnzippedFile, OriginalPath 'e.g., C:\fpsdata.mdb to
C:\Access97\fpsdata.mdb
' *****************************************
I had originally had this as:
On Error GoTo ReplaceOriginal_err
FileCopy UnzippedFile, OriginalPath 'e.g., C:\fpsdata.mdb to
C:\Access97\fpsdata.mdb
' *****************************************
If I use On Error GoTo ReplaceOriginal_err, the code errors-out at that
point with an error description of "Permission Denied". If I use On Error
Resume Next, the code runs fine. If I look in Windows Explorer at the point
of "Permission Denied", the user's local BE is open (.ldb exists) -- which
may explain the "Permission Denied". The user's FE should be linked to
Tempdata.mdb at that point. And, in fact, if I put a breakpoint at On Error
GoTo ReplaceOriginal_err -- just before FileCopy UnzippedFile,
riginalPath -- the FE is, in fact, linked to Tempdata.mdb and the local BE
is not open (no .ldb). Must be a timing thing, I guess? -- The linking to
Tempdata.mdb has not fully completed before the next line of code (FileCopy
.... ) begins?
The setup is a LAN with all the LAN FE's linked to the BE on P-drive.
Other users bring in their laptops to update their personal BE's. Their FE's
are linked to their own C-drive.
Certain records have flags and if the FE is linked to a C-drive, the flag is
turned on when the record is changed. (If the FE is already linked to the
LAN BE, then the flag is not turned on when the record is changed). When the
user wants to update their laptop -- without losing any of their own new
records, the code first appends all their flagged records to Temp tables in
their own FE. The code then copies the LAN BE to their local C-drive, makes
a second copy of the LAN's BE - also in their C-drive, links to the first
copy, replaces their local BE (which is located in a separate folder) with
the second copy, relinks to their original BE (now replaced with the copy of
the LAN's BE) and then re-inserts their new records. There's also a
procedure they can select for transferring their new records, including
Billing Records, to the LAN's BE. Transferring Billing Records is restricted
to one time at payroll; users, however, can update the BE at anytime -- they
just don't want to lose new records that have'nt been transferred yet.
Case Is = 4 'User selected Update with Billing Records to protect
'SourceFile = "P:\fpsdata.mdb"
'UnzippedFile = "C:\fpsdata.mdb"
'TempFile = "C:\tempdata.mdb"
'OriginalPath = "C:\Access97\fpsdata.mdb"
'1. run queries to fill FE TempTables
'2. FileCopy SourceFile, UnzippedFile
'3. FileCopy UnzippedFile, TempFile
'4. Link to TempFile
'5. FileCopy UnzippedFile, OriginalPath
'6. Link to OriginalPath
'7. run queries to restore new records
Select Case GetLinkedDBName("Names")
Case Is = "C:\Access97\fpsdata.mdb"
SourceFile = "P:\fpsdata.mdb"
UnzippedFile = "C:\fpsdata.mdb"
SourceInUse = "P:\fpsdata.ldb"
TempFile = "C:\tempdata.mdb"
OriginalPath = "C:\Access97\fpsdata.mdb"
Case Is = "C:\Access97\Petedata.mdb"
SourceFile = "P:\Petedata.mdb"
UnzippedFile = "C:\Petedata.mdb"
SourceInUse = "P:\Petedata.ldb"
TempFile = "C:\tempdata.mdb"
OriginalPath = "C:\Access97\Petedata.mdb"
End Select
'CHECK FOR EMPTY STAFF NAME, START OR STOP DATES:
If IsNull(Me!StaffSelect) Then
MsgBox "PLEASE ENTER YOUR NAME."
Exit Sub
End If
If IsNull(Me!Start) Then
MsgBox "PLEASE ENTER THE START DATE FOR THE CURRENT BILLING PERIOD."
Exit Sub
End If
If IsNull(Me!Stop) Then
MsgBox "PLEASE ENTER THE STOP DATE FOR THE CURRENT BILLING PERIOD."
Exit Sub
End If
' *****************************************
'EXIT IF THE NETWORK DATABASE IS IN USE
If Len(Dir(SourceInUse)) > 0 Then
MsgBox "The network database is in use. Try again later."
Exit Sub
End If
' *****************************************
'... assuming everything's OK ...
Set dbs = CurrentDb
Set Tdfs = dbs.TableDefs
DoCmd.RunMacro "OpenfrmPleaseWait"
DoCmd.Echo False, ""
DoCmd.SetWarnings False
DoCmd.Close acForm, "frmHidden", acSaveNo
'BACKUP NEW RECORDS TO FE TEMP TABLES
On Error Resume Next
'Formerly: DoCmd.RunMacro "UpdateDatabase.Step1_HomeComp"
DoCmd.OpenQuery "QEmpty_TempDischargeSummaries", acNormal, acEdit
DoCmd.OpenQuery "QEmpty_TempAssessment1", acNormal, acEdit
DoCmd.OpenQuery "QEmpty_TempAssessment2", acNormal, acEdit
DoCmd.OpenQuery "QEmpty_TempBMPNew", acNormal, acEdit
DoCmd.OpenQuery "QEmpty_TempBMP_TBs", acNormal, acEdit
DoCmd.OpenQuery "QEmpty_TempTherapyPlans", acNormal, acEdit
DoCmd.OpenQuery "QEmpty_TempMonthlySummaries", acNormal, acEdit
DoCmd.OpenQuery "QEmpty_TempServicesProvided", acNormal, acEdit
DoCmd.OpenQuery "QEmpty_TempTxPlans", acNormal, acEdit
DoCmd.OpenQuery "QEmpty_TempTxPlans_Problems", acNormal, acEdit
DoCmd.OpenQuery "QEmpty_TempAxisI", acNormal, acEdit
DoCmd.OpenQuery "QEmpty_TempAxisII", acNormal, acEdit
DoCmd.OpenQuery "QEmpty_TempPsychEval", acNormal, acEdit
DoCmd.OpenQuery "QFillTempDischargeSummaries", acNormal, acEdit
DoCmd.OpenQuery "QFillTempAssessment1", acNormal, acEdit
DoCmd.OpenQuery "QFillTempAssessment2", acNormal, acEdit
DoCmd.OpenQuery "QFillTempBMPNew", acNormal, acEdit
DoCmd.OpenQuery "QFillTempBMP_TBs", acNormal, acEdit
DoCmd.OpenQuery "QFillTempTherapyPlans", acNormal, acEdit
DoCmd.OpenQuery "QFillTempMonthlySummaries", acNormal, acEdit
DoCmd.OpenQuery "QFillTempServicesProvided", acNormal, acEdit
DoCmd.OpenQuery "QFillTempTxPlans", acNormal, acEdit
DoCmd.OpenQuery "QFillTempTxPlans_Problems", acNormal, acEdit
DoCmd.OpenQuery "QFillTempPsychEval", acNormal, acEdit
DoCmd.OpenQuery "QFillTempAxisI", acNormal, acEdit
DoCmd.OpenQuery "QFillTempAxisII", acNormal, acEdit
' *****************************************
'COPY THE NETWORK DATABASE TO THE LOCAL C-DRIVE
On Error GoTo CopyNetworkDatabase_err
FileCopy SourceFile, UnzippedFile 'UnzippedFile = e.g., C:\fpsdata.mdb
' *****************************************
'CREATE THE TEMPFILE
On Error GoTo CreateTempFile_err
FileCopy UnzippedFile, TempFile 'TempFile = "C:\tempdata.mdb"
' *****************************************
'LINK TEMPORARILY TO "C:\tempdata.mdb"
On Error GoTo Relink_err
'Loop through the tables collection
For Each tdf In Tdfs
'...link main tables
If Len(tdf.Connect) > 0 Then
Select Case Left(tdf.SourceTableName, 4)
Case Is = "DapN"
'tdf.Connect = ";DATABASE=" & NewDapNotesPathname
'tdf.RefreshLink
Case Else
tdf.Connect = ";DATABASE=" & TempFile 'i.e.,
"C:\tempdata.mdb"
tdf.RefreshLink
End Select
End If
Next 'Goto next table
' *****************************************
'REPLACE ORIGINAL BE WITH NEW BE (UNZIPPEDFILE)
On Error Resume Next
FileCopy UnzippedFile, OriginalPath 'e.g., C:\fpsdata.mdb to
C:\Access97\fpsdata.mdb
' *****************************************
'RE-LINK TABLES
On Error GoTo Relink_err
'Loop through the tables collection
For Each tdf In Tdfs
'...link main tables
If Len(tdf.Connect) > 0 Then
Select Case Left(tdf.SourceTableName, 4)
Case Is = "DapN"
'tdf.Connect = ";DATABASE=" & NewDapNotesPathname
'tdf.RefreshLink
Case Else
tdf.Connect = ";DATABASE=" & OriginalPath
tdf.RefreshLink
End Select
End If
Next 'Goto next table
' *****************************************
'REPLACE NEW RECORDS
On Error Resume Next
'Formerly: DoCmd.RunMacro "UpdateDatabase.Step3_HomeComp"
DoCmd.OpenQuery "QUpdateMatching_DischargeSummaries", acNormal, acEdit
DoCmd.OpenQuery "QUpdateMatching_MonthlySummaries", acNormal, acEdit
DoCmd.OpenQuery "QUpdateMatching_Assessments1", acNormal, acEdit
DoCmd.OpenQuery "QUpdateMatching_Assessments2", acNormal, acEdit
DoCmd.OpenQuery "QUpdateMatching_BMPNew", acNormal, acEdit
DoCmd.OpenQuery "QUpdateMatching_BMP_TBs", acNormal, acEdit
DoCmd.OpenQuery "QUpdateMatching_TherapyPlans", acNormal, acEdit
DoCmd.OpenQuery "QUpdateMatching_TxPlans", acNormal, acEdit
DoCmd.OpenQuery "QUpdateMatching_TxPlans_Problems", acNormal, acEdit
DoCmd.OpenQuery "QUpdateMatching_PsychEval", acNormal, acEdit
DoCmd.OpenQuery "QUpdateMatching_AxisI", acNormal, acEdit
DoCmd.OpenQuery "QUpdateMatching_AxisII", acNormal, acEdit
DoCmd.OpenQuery "QAppend_DischargeSummaries", acNormal, acEdit
DoCmd.OpenQuery "QAppend_TherapyPlans", acNormal, acEdit
DoCmd.OpenQuery "QAppend_Assessments1", acNormal, acEdit
DoCmd.OpenQuery "QAppend_Assessments2", acNormal, acEdit
DoCmd.OpenQuery "QAppend_BMPNew", acNormal, acEdit
DoCmd.OpenQuery "QAppend_BMP_TBs", acNormal, acEdit
DoCmd.OpenQuery "QAppend_MonthlySummaries", acNormal, acEdit
DoCmd.OpenQuery "QAppend_ServicesProvided", acNormal, acEdit
DoCmd.OpenQuery "QAppend_TxPlans", acNormal, acEdit
DoCmd.OpenQuery "QAppend_TxPlans_Problems", acNormal, acEdit
DoCmd.OpenQuery "QAppend_PsychEval", acNormal, acEdit
DoCmd.OpenQuery "QAppend_AxisI", acNormal, acEdit
DoCmd.OpenQuery "QAppend_AxisII", acNormal, acEdit
GoTo ProcessComplete
' *****************************************
End Select 'User's selection on Frame74
' *****************************************
ProcessComplete:
Set dbs = Nothing
Set Tdfs = Nothing
Set tdf = Nothing
DoCmd.OpenForm "frmHidden", , , , , acHidden
DoCmd.Close acForm, "PleaseWait", acSaveNo
DoCmd.SetWarnings True
DoCmd.Echo True
MsgBox "Process Complete"
Exit Sub
CopyNetworkDatabase_err:
Set dbs = Nothing
Set Tdfs = Nothing
Set tdf = Nothing
DoCmd.OpenForm "frmHidden", , , , , acHidden
DoCmd.Close acForm, "PleaseWait", acSaveNo
DoCmd.SetWarnings True
DoCmd.Echo True
MsgBox "COPY THE NETWORK DATABASE TO THE LOCAL C-DRIVE -- " &
Err.Description
Exit Sub
CreateTempFile_err:
Set dbs = Nothing
Set Tdfs = Nothing
Set tdf = Nothing
DoCmd.OpenForm "frmHidden", , , , , acHidden
DoCmd.Close acForm, "PleaseWait", acSaveNo
DoCmd.SetWarnings True
DoCmd.Echo True
MsgBox "CreateTempFile_err: " & Err.Description
Exit Sub
Relink_err:
Set dbs = Nothing
Set Tdfs = Nothing
Set tdf = Nothing
DoCmd.OpenForm "frmHidden", , , , , acHidden
DoCmd.Close acForm, "PleaseWait", acSaveNo
DoCmd.SetWarnings True
DoCmd.Echo True
MsgBox "Relink_err: " & Err.Description
Exit Sub
End Sub