M
MechEngr
When running the following code in ACCESS 2007, I receive security warnings
when hitting line “DoCmd.TransferDatabase acImportâ€â€¦but only with ACCESS
2007. ACCESS 2003 actually follows the “DoCmd.SetWarnings False†command and
does not request the user to respond to multiple security warnings.
Any suggestions?
DoCmd.SetWarnings False
For intI = 0 To UBound(DataFileArray)
If intI = 0 Then
On Error GoTo Err_TableImport
Else
On Error Resume Next
End If
strTargetTableName = DataFileArray(intI)
strTempTableName = DataFileArray(intI) & "_temp"
CheckTableExist = CheckTable(strTempTableName)
If CheckTableExist = 1 Then 'Temp Table already exists and will
be deleted
DoCmd.DeleteObject acTable, strTempTableName
End If
DoCmd.TransferDatabase acImport, "Microsoft Access",
strInputFileName, acTable, strTargetTableName, strTempTableName
Next
DoCmd.SetWarnings True
On Error GoTo Err_One_Click_Update
when hitting line “DoCmd.TransferDatabase acImportâ€â€¦but only with ACCESS
2007. ACCESS 2003 actually follows the “DoCmd.SetWarnings False†command and
does not request the user to respond to multiple security warnings.
Any suggestions?
DoCmd.SetWarnings False
For intI = 0 To UBound(DataFileArray)
If intI = 0 Then
On Error GoTo Err_TableImport
Else
On Error Resume Next
End If
strTargetTableName = DataFileArray(intI)
strTempTableName = DataFileArray(intI) & "_temp"
CheckTableExist = CheckTable(strTempTableName)
If CheckTableExist = 1 Then 'Temp Table already exists and will
be deleted
DoCmd.DeleteObject acTable, strTempTableName
End If
DoCmd.TransferDatabase acImport, "Microsoft Access",
strInputFileName, acTable, strTargetTableName, strTempTableName
Next
DoCmd.SetWarnings True
On Error GoTo Err_One_Click_Update