Link to home
Start Free TrialLog in
Avatar of pcalabria
pcalabriaFlag for United States of America

asked on

Need Help Eliminated MS Access security message when TransferDatabase method is used

I need to disable the Office 365 security warning message while running MS Access.

I already created a trusted location and this works well for all of my linked tables.

One line of code, however causes the security message to pop up even if the location is trusted.

The code is:

DoCmd.TransferDatabase acExport, "Microsoft Access", "//" & stFileServerComputerName & "/Export/EmployeeRoster.mdb", , "tblEmployeeBasicExportFile", "EmployeeRosterBasic"

with stFileServerComputerName = to MyComputer

//Mycomputer/Export/ is a trusted location.

The message A potential security violation has been indentified: //Mycomputer/Export/EmployeeRoster.mdb  (yes, the allow subdirectories box is checked)

Can anyone help?  Thanks
Avatar of Gustav Brock
Gustav Brock
Flag of Denmark image

I can't replicate this - not even when copying to another computer.

I have checked under security settings: Allow trusted locations on my network (not recommended)
ASKER CERTIFIED SOLUTION
Avatar of John Tsioumpris
John Tsioumpris
Flag of Greece image

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

ASKER

@Gustav yes, network locations are enabled

@John I’m using slashes while your example issues backslashes??  My code has worked with slashes without issues with earlier versions of access????

I can certainly give the backslashes a try... that’s what you are suggesting?
(Forward) slashes are for Unix and the web. In DOS and Windows backslashes are used.
The backslash vs slash thing drives me crazy... is it that simple Gustav??  I guess we have to add file explorer paths???
Not sure what "file explorer paths" are, other than just being "paths".
But backslash is it for sure. A (forward) slash in a DOS/Windows path is forbidden in any case.
If you don't try you will never know...
Thanks again, to both of you!
John you mentioned the solution first.. and Gustav helped to clear up slash craziness I've experienced.
Thanks