OutputTo making file read only

SnowBall

New member
Local time
Today, 07:56
Joined
Jul 18, 2007
Messages
1
I am using the do.cmd outputTo command. Does anyone know of a way to make the output file read only?

DoCmd.OutputTo acOutputQuery, strquery, acFormatXLS, filepath, True
 
Hi,

If i read this correctly, you're exporting a query into an excel file, is this correct?

If so, there's no way to do that because, obviously, is in excel. You could; however, create a basic report and output it as a snapshot and this will solve your problem.
 
Last edited:
Or - you could use another method whereby you create a spreadsheet (using the Excel object), populate the spreadsheet and then lock all of its cells and protect the workbook - all through VBA ?
 
Excellent suggestion :D

I'm curious... is this being exported for viewing only or as an attachment file? If it's only for displaying purposes, why not show the data in an access datasheet form? The recordset type can be snapshot and thereby uneditable.
 
Last edited:

Users who are viewing this thread

Back
Top Bottom