Allow Edits on Subform

Just a quick question I hope. I am using this simple VB code (see attached) on a button to allow edits to a form. Problem is, clicking the button only allows edits to the form not the subform. How do I modify the code to allow edits to both please

Sponsored Links:

Related Topics

Forms! Allow Deletions/Edits - No
there, hope doing fine.

I have a main form with subform and looking lock the delections and edits but when I do that so subform is also locked and cant enter new data into it. I have done this for single form but with subform, dont know so far.

it is required bcz when ever open the form so bymistake the old data modified.


Cant edit subform of a subform
Hoping someone can help with what I need to do to allow the following to work:

I have a main formlinked to a subform, within the subform, I have a second subform.

I am able to edit and add data in the main form, and the first subform. I am not able to edit or enter data into the second subform.

If I open the first subform directly without going into the main form, I have no problem entering data into the second subform.

All the properties are set to allow edits, allow additions, allow deletions


Subform goes out of touch when its table is edited?
I have an Access 2007 subform linked to the mainfor, and they were both working fine. it linked on the proper parent/child link, edits on the subform tracked the proper parent record, etc. etc.

Then I edited the table bound to the subform simply to make one of its text fields longer; that's all!

Now, data from the subform table does not show up in the subform at all.

I can still add a new record via the subform, but I will only be able to see it briefly (while initially entering it). if I go to a different mainform record and then return to the one that should have the new subtable record, again, it doesn't show.

However, looking directly at the table for the subform shows that the new record (and the old ones) are indeed still allproperly there in their table.


Deletions vs. Edits
Just when I think I'm getting it. I've got a form that I want to allow people to add or delete records, but NOT edit records. I thought that changing the Form properties to Allow Deletions and Allow Additions, but NOT Edits would do this. Silly me.

Is there a way to Allow Deletions without allowing Edits. I need to have some control over what's going in and out of the database.


Disallow edits to saved query
I have a subform bound to a query displaying in datasheet view, and I like the ability to use the built-in arrows in the field names to further filter and sort the query results. However, if I use a filter and then close the form, I get a pop-up asking if I want to save the changes to the query. I don't want the user to be able to change any of the queries. I tried using the 'enabled' property, but that makes the filter/sort unavailable. Is there some other way I can enable the filter/sort but not allow edits to the saved query?


Allowing edits in a query based datasheet
I have a datasheet that looks up data based on a query of two tables. The datasheet shows the data correctly, but it will not allow edits. I tried setting the data entry property to True but this had no effect. Also I was looking for the place where you can set the primary key for the form, but I could not find it. It would be good if edits were allowed on this form,


Replace Function with Table Lookup
I have several records that contain very similar substrings, such as "billable edits" and "edits- billable" that I am trying to standardize (make all "edits-billable" become "billable edits") for simplicity's sake. The challenge is that these substrings occur at the end of lengthy strings. I created a table with two fields, the current substrings and the substrings that I would like to replace them with. How can I connect this table, using a replace function, the edit the original strings? Or is there an alternate way to do this


Set subform AllowEdits property from another form
When my form that contains two subforms is opened from certain other forms, I want to disallow edits on one of the subforms and on the parent.

Docmd.openForm "ParentName"
Forms!ParentName.AllowEdits=False
This only works for the parent-the subforms still allow edits (something that affects totals on the Parent)

I added:
Forms!ParentName.Form.Child2Name.AllowEdits=False

which gives me an error message.

I am using A2007 with W7.


command button for allow edits
I want to emphasize users to be careful of editing data in a specific table, but I want them to be able to fix previous data entry errors.

I know I can go into the data tab of property and select "no" for 'Allow edits'. Is there a code or something I can put into a command button to change "Allow edits" to a "Yes'?

Or is there another strategy to limit accidental changes to data?

Btw, I'm still new to learning codes


Set subform AllowEdits property from another form
When my form that contains two subforms is opened from certain other forms, I want to disallow edits on one of the subforms and on the parent.
My code:

Docmd.openForm "ParentName"
Forms!ParentName.AllowEdits=False
This only works for the parent-the subforms still allow edits (something that affects totals on the Parent)

I added:
Forms!ParentName.Form.Child2Name.AllowEdits=False

which gives me an error message.

I am using A2007 with W7.

I know that I can open the whole form as read-only, but would like child1 to be available for editing. I have searched, and found things that I thought would apply, but am missing something.


Archiving records which have been edited/added/deleted
At the moment I have Form 1 which is based on Table 1. I am required to create a method on tracking any edits/additions/deletions with a reason why. Currently I have a way of only allowing the user to press on a Submit button and disabling navigation buttons when edit is pressed or a new record event occurs.

This submit button makes the form footer appear where the save button currently hides.

Once saved the form footer then disappears again and the buttons return to enabled.

I created this format to add in fields of who/when/why the person is editing for quality assurance reasons when I knew more about what needed to be added. The fields within Form 1 need tobe archived with the editing reasons within a table.

I thought maybe a subform would work within the form footer for the editing fields as they work on a one-many relationship with each record. There are two problems with this method.

1 - Being that I need to bypass the update which occurs when the subform gains focus and have the save occur with both the form and subform.

2 - I have no idea how to keep the old records from Table 1 each time, I.e. If you need to edit a field in Form 1 and have previously edited it before that how could I go about saving allthe editable fields within Table 1 with a new record and not overriding the old one before edits?

If you can think of anyway to help me then even better.


Data Entry Locked when Subform
I have a few forms which I have designed to be subforms to a mainform that has no fields or record source.

The forms have an unbound textbox and combo box, which I use to seach the data on these 'continuous' forms. Which works fine when I open them as main form. However, as soon as I use them assubforms I can't enter or select anything from the unbound textbox and combo box on the subform.

I have checked both the mainform, subform and subform unbound textbox and combo box settings and all allow edits.

What else is causing the subforms unbound textbox and combo box to be locked ?


Automate record entry on Subform
I have a form with various fields bound to a table called {AuditData}. One field in particular is [SerialNo]. I have a subform (bound to table {AuditDetail}) on this particular form where there is a child field called [SerialNo] as well. The subform field populates when [SerialNo] is entered on the main form. The problem that I'm having is that it IS NOT creating a new record in the table {AuditDetail}. The only other field on the subform is one with a default value which is obviously already populated. When I save the record, {AuditData} shows the new record based on the values of the form, but {AuditDetail} has no entry at all. I'm missing something. Both the main form and the subform are set to Data Entry and to allow additions/edits. I don't know where to look next


Use of acFormReadOnly vs acFormEdit
I am using MS Access 2003. I have a form on which there is a sub form and then another sub form inside the first one.

I am trying to use the Open with Edit when the user can Edit and ReadOnly when they cannot. The problem I am having is that the use of these arguments changes the subform control properties re allow Edits, allow deletions and allow Additions on what appears to be a permanent basis.

To be, more specific when the Form and subforms are opened acFormReadonly the Allow properties are all set fo No on both sub forms.

However when I then try and open the form with acFormEdit these subform properties are not changed back to Yes.

I have tried actually setting the subform properties directly inside the more major form (I.e. Form and subform1) but that only works if there are records to be displayed in the subforms. (me.subform.form.allowedits = true).

If I am trying to enter a new master record to then add the sub records I get an error message saying the the allowedits property is not (yet?) availableto change.

According to the Help on the subject the mode used to open the form should override any of the form allow properties.


Allowing both multiple values and list edits in Lookup field
In Access 2007 I am trying to make a table column utilize a combo box that allows both multiple values and list edits. However, when I set it to allow both features, it doesn't let me make any edits to the list in the table; the multiple values aspect works just fine. When I don't allow multiple values, I can edit it to my heart's content.

I know that I'm doing it right (all you have to do is select "Yes"!) but it's jut not allowing me to have both allowances as it should.


Creating a command button to edit a record
I have a form that is set to allow edits no to prevent accidential changes to data. I am trying to write a command button the will allow a record to be changed and when saved set the allow edits back to no. I am very new at this and need


Option group - Filter
I have yet another question.
I have a main form, frmEvent, and a subform inside it, frmAssignments.
On the subform I have an option group, which is supposed to filter the assignments by type. Here's the code:

Private Sub FrameFilterAssignTypes_AfterUpdate() globFilt = "assignType in " & IIf(FrameFilterAssignTypes = 1, "(1,2,3)", IIf(FrameFilterAssignTypes = 2, "(1)", IIf(FrameFilterAssignTypes = 3, "(2)", "(3)"))) Filter = globFilt FilterOn = True End Sub

globFilt is a global variable. Subform's allow edits is set to Yes now.
Debug stops on the red line and gives me "You canceled the previous operation".
The exact same code (with another names) worked great on the main form, so I'm guessing it has to do with option group being on the subform.
Please enlighten me, what is wrong here


Accessing a subform control from another subform
How do I reference a subform control from another subform?

Main Form: frmOfferCreate
Subform 1: frmVendorSelect
Subform 2: frmSku Select Activate

Subform 2 has a hidden button (cmdChangeVendor) (should only be visible if you use subform 1). When in subform 1, when I hit continue, it runs a macro that runs queries and opens subform 2. I want to set the property of the button in subform 2 to visible.

You can also access subform 2 from another location, so I can't use the On Load property.

In the macro I have:
Action = SetProperty with Control name = subform string, Property = Visible, Value = Yes

I have tried the following subform strings:


Detect changes in a table/query
I noticed there's events attached to onChange and onDirty and I was wondering if it's possible to scan a table to detect rows where one or more fields have either changed or becomemarked as Dirty? I am trying to come up with a batch operation that kicks in when the user is done making edits, if it's possible to detect a field changes status that would be a good way to find edits.


Access 2007, all subforms read-only
I've converted an application from Access 2003 to Access 2007. Everything was looking good until I tried editing some data from a subform and discovered that all forms, when displayed as a subform, are read-only.

I tried the old version and all of the subforms work fine and I even converted the old version again and all of the subforms are working -- but I've done a lot of work on first conversion so would like to not need to start over, if possible.

This is not an issue with joins or read-only queries because some of the forms being used as a subform that are read-only are linked directly to a table. Also if a form is placed as a subform on another form, but is not linked to the master form at all, editing works. I checked the obvious (allow edits, enabled, locked, etc.)

Is there a new option in 2007 that affects subforms -- like is there an option somewhere that sets all subforms to read-only? Forms/subforms that were working no longer do so