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

changing the 'AllowEdits' property on a subform

Hi all,

Im wondering why the following will work
Me.Controls("subnonstorePos").visible = False

while
Me.Controls("subnonstorePos").AllowEdits = False
give me an
'property not support by this object error'
Any advice, alternatives, suggestions welcome.
Gerry Abbott
Nov 13 '05 #1
3 7466

"Gerry Abbott" <pl****@ask.ie> schreef in bericht news:6I*******************@news.indigo.ie...
Hi all,

Im wondering why the following will work
Me.Controls("subnonstorePos").visible = False

while
Me.Controls("subnonstorePos").AllowEdits = False
give me an
'property not support by this object error'


It is because ... 'the property is not supported by this object' ..
AllowEdits is a form-property, not a control-property.
You need the property 'Locked' I guess

--
Hope this helps
Arno R
Nov 13 '05 #2
To explain Arno's answer further, you can refer to the form in the subform
control with the .Form property.

Try:
Me.Controls("subnonstorePos").Form.AllowEdits = False
or just:
Me.subnonstorePos.Form.AllowEdits = False

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Arno R" <ar***********@tiscali.nl> wrote in message
news:42*********************@dreader2.news.tiscali .nl...

"Gerry Abbott" <pl****@ask.ie> schreef in bericht
news:6I*******************@news.indigo.ie...

Im wondering why the following will work
Me.Controls("subnonstorePos").visible = False

while
Me.Controls("subnonstorePos").AllowEdits = False
give me an
'property not support by this object error'


It is because ... 'the property is not supported by this object' ..
AllowEdits is a form-property, not a control-property.
You need the property 'Locked' I guess

--
Hope this helps
Arno R
Nov 13 '05 #3
Thanks guys.
Changed from the control to the form property and it works fine.

So some properties are controls properties, eg visible/locked etc,,
me.controls("mysubform").visible=true

while others are form properties, eg AllowAdditions, AllowDeletions, etc.
me.form("mySubform").AllowDeletions=true

"Gerry Abbott" <pl****@ask.ie> wrote in message
news:6I*******************@news.indigo.ie...
Hi all,

Im wondering why the following will work
Me.Controls("subnonstorePos").visible = False

while
Me.Controls("subnonstorePos").AllowEdits = False
give me an
'property not support by this object error'
Any advice, alternatives, suggestions welcome.
Gerry Abbott

Nov 13 '05 #4

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

Similar topics

5
by: Dee | last post by:
I'm trying to change a field value on a subform called Inventory whenever a field on the main form is updated. I can't get it to work. Could someone correct my line of code? Private Sub...
1
by: Tim Graichen | last post by:
Hello, I currently have a subform that displays four fields from a query. I have the subform's properties set as follows, so that the end users can not accidently change the data. Allow...
1
by: Jan Nordgreen | last post by:
I use Access 2003 and WinXP. When my form has Allowedits = false I can not choose a row in the list box that shows some of the fields in the form's record source table. Why not? What is the...
3
by: vidar | last post by:
I have created a form that has where the AllowEdits=false. When the users try to edit and of the fields on the form, I want a Beep Sound. Tried: Private Sub Form_KeyDown(KeyCode As Integer,...
6
by: Bob Quintal | last post by:
Using Access '97. I have a subform, where the .AllowAdditions property is set to false. I have a button labelled 'Add record' that sets this property = true, followed by a DoCmd.gotoRecord...
1
by: runner7 | last post by:
Can anyone tell me if there is any way to change the default subform view from datasheet to only show a single record at a time? Can this be restricted in an application so that the user could...
8
Megalog
by: Megalog | last post by:
Hey guys.. my turn to ask a question: I'm having a weird issue with a form I've reworked. This form has a combo box, which when used is changing the recordsource of a subform. This subform has...
6
by: svdoerga | last post by:
I have a weird problem (or I'm overseeing something plain). I have a form which I open in formview with a query as recordsource (set in the design view). On opening, depending on some condition, the...
3
by: kate2272 | last post by:
Hi Guys I was wondering if it is possible to turn AllowEdits to false after data has been entered for individual fields within a form/sub-form. I've found that I can do this in the 'AfterUpDate'...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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
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
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,...

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.