Originally Posted by
euanl
You pretty much can't lock down the design view of queries without a lot of tinkering and messing about with the programme. Just tell your users not to change stuff, and if they do they get electric shock treatment or something.
You can however make the queries themselves read only through code by just opening each query in turn instead of using the macro:
Dim stdocname As String
'disable the warnings
DoCmd.SetWarnings False
'run the queries
stdocname = "your_firstquery_name"
DoCmd.OpenQuery stdocname, acViewNormal, acReadOnly
stdocname = "your_secondquery_name"
DoCmd.OpenQuery stdocname, acViewNormal, acReadOnly 'etc - you get the picture
'Re-enable the warnings
DoCmd.SetWarnings true