473,395 Members | 1,516 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,395 software developers and data experts.

Setting Updatable Property of QueryDef to False

lgs
In an application, I'm creating a QueryDef on the fly, then use
DoCmd.OpenQuery to display the results.

If the user changes column width, for example, s/he is prompted when
closing whether s/he wants to save the query. This doesn't work
anyway, since it's just a temporary QueryDef, but I'd like to avoid the
whole Save/Yes/No/Cancel dialog box entirely - it's just an annoying
nuisance that could confuse some.

The Updatable property of a QueryDef would seem to be a logical
candidate, but apparently you can only read this property, not set it,
and the default for this property is True, i.e., the QueryDef can be
changed.

Can anyone suggest either a way to set the Updatable property to False,
or in the alternative, intercept this dialog box and bypass it
entirely?

Thanks!

Larry Schmidt

Nov 13 '05 #1
1 2084
lgs wrote:
In an application, I'm creating a QueryDef on the fly, then use
DoCmd.OpenQuery to display the results.

If the user changes column width, for example, s/he is prompted when
closing whether s/he wants to save the query. This doesn't work
anyway, since it's just a temporary QueryDef, but I'd like to avoid the
whole Save/Yes/No/Cancel dialog box entirely - it's just an annoying
nuisance that could confuse some.

The Updatable property of a QueryDef would seem to be a logical
candidate, but apparently you can only read this property, not set it,
and the default for this property is True, i.e., the QueryDef can be
changed.

Can anyone suggest either a way to set the Updatable property to False,
or in the alternative, intercept this dialog box and bypass it
entirely?

Thanks!

Larry Schmidt


The only way I see you can do this is to pass create a form and set the
form's view as datasheet.

I created a form in the past that allows up to 20 fields. The 20 fields
are unbound. I pass an argument to the form based on what I want
displayed in the form. This determines the SQL for the form's
rowsource. It updates the labels (headings) based on the number of
fields. It turns all fields visible=false that exceed the number of
cols in the SQL. It sets the control source for the fields. It works
fine. It's a bit of work since you have to roll your own, but if you
have 20 or 30 queries you want to pass to it, it's worth it.

Nov 13 '05 #2

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

Similar topics

2
by: TF | last post by:
hi, i am using a ListBox control on a windows form using VB.Net. when i set the DataSource property of the control to an ArrayList it fires following events in this order: SelectedIndexChanged...
21
by: | last post by:
Hi, I am setting the NumericUpDown .Value property and the ValueChanged event is NOT being fired. Does this ONLY get fired when I change it on the UI and not programatically? Thanks
3
by: CSDunn | last post by:
Hello, I currently have an Access 2003 ADP Report/Subreport set up in which I have 12 subreports in a single main report that are located in a group header called 'PermnumHeader' (Permnum would be...
5
by: Mark | last post by:
Hi All, This maybe a really simple question but I need some help. I have been having problems with security and thanks to the help received from a reply to an earlier post, I have found a...
11
by: Zlatko Matić | last post by:
Hello. I have a MS Access front-end working with PostgreSQL database. I have successfully created saved File DSN. My paa-through queries are referring to that file as well as linked tables. But I...
18
by: Dixie | last post by:
Can I set the Format property in a date/time field in code? Can I set the Input Mask in a date/time field in code? Can I set the Format of a Yes/No field to Checkbox in code? I am working on...
6
by: Tim Marshall | last post by:
A2003, but this behaviour also occurred during the same DAO process I'm about to describe in A97. I have a sub procedure which takes two arguments: a querydef name; and an SQL statement...
4
by: Gill Smith | last post by:
After setting the web control text box enable property to FALSE makes the control to loose the data between round trip. I am making sure that the property - EnableViewState = TRUE. Same code...
3
by: ruthboaz | last post by:
Hi, I am upgrading the current ms access .mdb file to a .adp with sql server back end. I have been converted tables, forms, reports to .adp.. The tables are reflected at the server. a) ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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
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...

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.