473,408 Members | 1,857 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,408 software developers and data experts.

making queries read only

Hi folks.

I have a query opened from a menu bar. Is it possible to make the query read
only?

Thanks
Al
Nov 13 '05 #1
3 27050
"Baldy" <Jo**@smith.com> wrote in message
news:41**********@news.adelaide.pipenetworks.com.. .
Hi folks.

I have a query opened from a menu bar. Is it possible to make the query read
only?


Set its RecordSource Type to Snapshot.
--
I don't check the Email account attached
to this message. Send instead to...
RBrandt at Hunter dot com
Nov 13 '05 #2
"Baldy" <Jo**@smith.com> wrote in message
news:41**********@news.adelaide.pipenetworks.com.. .
Hi folks.

I have a query opened from a menu bar. Is it possible to make the query read only?

Thanks
Al

From a menu bar? If this a menu you designed and you wrote the code to open
the query, you could use something like this:
Docmd.OpenQuery "qryMyQuery",acViewNormal,acReadOnly

Alternatively you could change the design of the query so it is always
read-only by, for example, adding DISTINCT after the SELECT key word:
SELECT DISTINCT ID, Field1, Field2 FROM MyTable

Another alternative would be to open a form in datasheet view which is bound
to the query, instead of opening a query directly. This gives you lots more
flexibility since as well as the basic AllowEdits, AllowAdditions,
AllowDeletions properties of the form, you can lock or unlock, enable or
disable individual controls. You also can write any amount of code to react
to the form's events.
Nov 13 '05 #3
Thanks that did it,

I used distinct in the query,

I'm calling deirct to the query form the menu so I couldn't use
"acReadOnly"

thanks
Al
"Eric Schittlipz" <er**@schittlipz.com> wrote in message
news:ck**********@titan.btinternet.com...
"Baldy" <Jo**@smith.com> wrote in message
news:41**********@news.adelaide.pipenetworks.com.. .
Hi folks.

I have a query opened from a menu bar. Is it possible to make the query

read
only?

Thanks
Al

From a menu bar? If this a menu you designed and you wrote the code to
open
the query, you could use something like this:
Docmd.OpenQuery "qryMyQuery",acViewNormal,acReadOnly

Alternatively you could change the design of the query so it is always
read-only by, for example, adding DISTINCT after the SELECT key word:
SELECT DISTINCT ID, Field1, Field2 FROM MyTable

Another alternative would be to open a form in datasheet view which is
bound
to the query, instead of opening a query directly. This gives you lots
more
flexibility since as well as the basic AllowEdits, AllowAdditions,
AllowDeletions properties of the form, you can lock or unlock, enable or
disable individual controls. You also can write any amount of code to
react
to the form's events.

Nov 13 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: David Walker | last post by:
Hi I have a Microsoft SQL database I can use (also mySQL, so if you know how to do this in mySQL that is just as useful). The database can only be accessed from webpages hosted on the same server...
6
by: Andreas Lauffer | last post by:
I changed from Access97 to AccessXP and I have immense performance problems. Details: - Access XP MDB with Jet 4.0 ( no ADP-Project ) - Linked Tables to SQL-Server 2000 over ODBC I used...
19
by: Christian Fowler | last post by:
I have a VERY LARGE pile of geographic data that I am importing into a database (db of choice is postgres, though may hop to oracle if necessary). The data is strictly hierarchical - each node has...
1
by: Henrik | last post by:
Hi all I have a tab-defined file linked to a table in access. it seems to work fine but I can't make changes or delete any queries. Why? It only works if I make new queries. Henrik
7
by: Zlatko Matić | last post by:
Let's assume that we have a database on some SQL server (let it be MS SQL Server) and that we want to execute some parameterized query as a pass.through query. How can we pass parameters to the...
14
by: google | last post by:
I am creating a new database for use within our company, that I'd like to make reasonably secure (short of a true server based solution). The back-end of a non-server based database seems to be...
1
by: Kurch | last post by:
Hello, I have an Access file saved on my company server. Is it possible to allow selected people within my network to access a query that I've written and allow them to read and write changes...
2
by: gen_tricomi | last post by:
THE IMPORTANCE OF MAKING THE GOOGLE INDEX DOWNLOADABLE I write here to make a request on behalf of all the programmers on earth who have been or are intending to use the Google web search API...
1
by: JosAH | last post by:
Greetings, Introduction This week we start building Query objects. A query can retrieve portions of text from a Library. I don't want users to build queries by themselves, because users make...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.