PC Review


Reply
Thread Tools Rate Thread

How to Disable Query Design view

 
 
Barmaley
Guest
Posts: n/a
 
      8th Jun 2005
I want to prevent users from opening MS Access Query in design view.

I got a feeling that this is something simple, but it just escapes me.

Artem

MS Access 2000 SP3
Windows 2000 SP4


 
Reply With Quote
 
 
 
 
=?Utf-8?B?Q2hhaW0=?=
Guest
Posts: n/a
 
      8th Jun 2005
Set 'Allow Design Changes' on the Other tab in the Properties window for the
form to 'Design View Only'.
--
Chaim


"Barmaley" wrote:

> I want to prevent users from opening MS Access Query in design view.
>
> I got a feeling that this is something simple, but it just escapes me.
>
> Artem
>
> MS Access 2000 SP3
> Windows 2000 SP4
>
>
>

 
Reply With Quote
 
TC
Guest
Posts: n/a
 
      9th Jun 2005
I'm not sure you /can/ stop a user from retrieving the design of a
query if he has permission to run that query. (Happy to be corrected on
that!)

You can certainly stop him /modifying/ the design - is that what you're
actually worried about?

HTH,
TC

 
Reply With Quote
 
Barmaley
Guest
Posts: n/a
 
      9th Jun 2005
Well,

I am exploring different possibilities.
Actually I wanted to prevent users to see the design because properties
contain User Name and password for connection (SPTQ)
Sinse so far it seems impossible, I am modifying my code to change my query
on the fly and delete info I don't want for users to see.

At the moment trying to find example of how to cycle through all my queries.

Thanks,

Artem


"TC" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> I'm not sure you /can/ stop a user from retrieving the design of a
> query if he has permission to run that query. (Happy to be corrected on
> that!)
>
> You can certainly stop him /modifying/ the design - is that what you're
> actually worried about?
>
> HTH,
> TC
>



 
Reply With Quote
 
TC
Guest
Posts: n/a
 
      10th Jun 2005
(untested)

dim db as database, qd as querydef
set db = currentdb()
for each qd in db.querydefs
msgbox qd.name
next
set db = nothing

HTH,
TC

 
Reply With Quote
 
Arvin Rex
Guest
Posts: n/a
 
      10th Jun 2005
TC wrote:
> (untested)
>
> dim db as database, qd as querydef
> set db = currentdb()
> for each qd in db.querydefs
> msgbox qd.name
> next
> set db = nothing
>
> HTH,
> TC
>

THIS WILL DELETE YOUR QUERY!!! Not hide it
adrian
 
Reply With Quote
 
TC
Guest
Posts: n/a
 
      10th Jun 2005
What on earth are you talking about?

The code I posted will enumerate the queries in the current database,
and display their names in message boxes.

It will not delete anything - under any circumstances.

Please retract your incorrect comment.

TC

 
Reply With Quote
 
TC
Guest
Posts: n/a
 
      10th Jun 2005
I am off for the day.

I expect you to retract your incorrect comment, per my other reply,
before I return in 24 hours.

TC

 
Reply With Quote
 
Barmaley
Guest
Posts: n/a
 
      10th Jun 2005
Thank you TC.

I already found one way of doing it and you provided different way.
I tested your code - it works.
I have no idea why Arvin thinks that your code will delete all queries
(maybe Set db = Nothing statement ????).

Here code snippets - both result in same thing:

Thanks again


Sub step_through_All_queries_1()
Dim obj As AccessObject, dbs As Object
Set dbs = Application.CurrentData
' Search for open AccessObject objects in AllQueries collection.
For Each obj In dbs.AllQueries
'If obj.IsLoaded = True Then
' Print name of obj.
Debug.Print obj.Name
'End If
Next obj
End Sub

Sub step_through_all_queries_2()
Dim db As Database, qd As QueryDef
Set db = CurrentDb()
For Each qd In db.QueryDefs
Debug.Print qd.Name
Next
Set db = Nothing
End Sub

"TC" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> (untested)
>
> dim db as database, qd as querydef
> set db = currentdb()
> for each qd in db.querydefs
> msgbox qd.name
> next
> set db = nothing
>
> HTH,
> TC
>



 
Reply With Quote
 
TC
Guest
Posts: n/a
 
      11th Jun 2005


Barmaley wrote:

> Thank you TC.
>
> I already found one way of doing it and you provided different way.
> I tested your code - it works.


No probs, glad it helped.


> I have no idea why Arvin thinks that your code will delete all queries
> (maybe Set db = Nothing statement ????).


He's an idiot. I emailed him to post a retraction but he is too stupid
to do so.

Cheers,
TC

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Disable Design View? =?Utf-8?B?U3RldmVT?= Microsoft Access Security 2 22nd Jun 2007 03:42 PM
disable design view ChasW Microsoft Access 2 9th Apr 2006 08:47 PM
How to Disable Query Design view Barmaley Microsoft Access Form Coding 10 11th Jun 2005 01:29 PM
Disable the design view Mei Qin Microsoft Access Forms 1 17th Sep 2004 05:41 PM
Disable design view marilyn Microsoft Access Forms 2 4th Sep 2004 09:39 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:11 PM.