S
SJ
I have a query in Access and export the results as a table in an Access
database in the same directory. This works fine in Access 2003. However,
in Access 2007, a security message displays and the user is prompted to
choose open or cancel.
My code is below. It copies the query results to a new database and names
the table in the destination database the same name as the query in the
source database.
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
Any suggestions appreciated.
database in the same directory. This works fine in Access 2003. However,
in Access 2007, a security message displays and the user is prompted to
choose open or cancel.
My code is below. It copies the query results to a new database and names
the table in the destination database the same name as the query in the
source database.
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
Any suggestions appreciated.