Access 2007 security warning with DoCmd.TransferDatabase

X

xlguy

My code works fine in Access 2003, but I am prompted with a security message
in 2007. I am copying the results of a query in the currentdatabase to a
table in the destination database.

Code is below:

Sub CopyQueryResultsToTemp(sQuery As String)
Dim LFilename As String
LFilename = Application.CurrentProject.Path & \Temp.mdb
DoCmd.TransferDatabase acExport, "Microsoft Access", LFilename, acTable,
sQuery, sQuery, False
End Sub
 
A

AccessVandal via AccessMonster.com

Is the db in Trusted locations?
My code works fine in Access 2003, but I am prompted with a security message
in 2007. I am copying the results of a query in the currentdatabase to a
table in the destination database.

Code is below:

Sub CopyQueryResultsToTemp(sQuery As String)
Dim LFilename As String
LFilename = Application.CurrentProject.Path & \Temp.mdb
DoCmd.TransferDatabase acExport, "Microsoft Access", LFilename, acTable,
sQuery, sQuery, False
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top