allow edit in simple subform

M

MattE

I've got a form that's bound to a table. This data can be edited. And
there's a subform that's bound to another simple table, and the links
work so the subform shows the correct data related to the main form.

For some reason the subform data cannot be edited. The control table
is very simple so it shouldn't be making it un-updatable. The
subform's Allow Edits is Yes. Is there another property I'm missing?

I've been looking in this forum and have found similar questions but
can't seem to come up with a working answer.

Any ideas? Thanks!

Matt
 
S

Steve Schapel

Matt,

In the subform, assuming it is continuous view, do you see a blank line
at the bottom, to allow the entry of a new record? If so, can you enter
a new record? Another thing to check is the Locked property of the
controls on the subform.

Well, that's a start...
 
P

privatenews

Hello Matt,

Thank you for your post in MSDN newsgroup!

I understand subform linked to a table cannot be edited. If I'm off-base,
please let me know.


If your form is just based on a table, then you can use the following code
to make the form editable:

Please note that the subform is editable only when the main form is
editable. The AllowEdits property is considered a Form property. Even
though the Subform is a control on the Form, Access treats Subforms
differently versus other controls on the Form (e.g., ComboBox, Listbox,
etc) when using VBA to modify objects.

I understand that you'v changed subform' AllowEdits to "Yes" but you may
check if this has any difference if you set it via code:

======================
Me.AllowEdits = True
Me.SubForm.Form.AllowEdits = True
======================

Also, as Steve mentioned, please confirm if you could enter a new record
/locked property of the controls.

I suggest that you check if subform in orders form in Northwind sample
database works correctly. If you create a new form with the same subform on
sample database, can you reproduce the issue?

If you have any other information, please also let's know.

Best Regards,

Peter Yang
MCSE2000/2003, MCSA, MCDBA
Microsoft Online Partner Support


=====================================================

Microsoft Online Community Support
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications
<http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx>.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
<http://msdn.microsoft.com/subscriptions/support/default.aspx>.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
 
M

MattE

Peter,

Thanks for your response. I am able now to edit the data and it shows
a blank line at the bottom so I can add a record, so the initial
problem is fixed.

Now I need to get the destination of the listbox selection correct, and
I think that's just a matter of further learning. It's supposed to get
the list box list from one table (Products) and I think this is working
ok, but it's supposed to save the selected value in another table
(ProductsPerJob) which is not happening. Here I go delving into the
help ...

Thanks,
Matt
 
M

MattE

I should clarify, each row on the subform has a ListBox which is what I
was referring to.
Matt
 
S

Steve Schapel

Matt,

Hace a look at the Properties of the Listbox. In particular, the Control
Source property. It should show the name of the field in ProductsPerJob
table which the selection is supposed to be stored to.
 
P

privatenews

Hello Matt,

Thank you for your reply. As Steve said, Control Source property shall be
the field of ProductsPerJob table and the form's Record Source shall be
configured to ProductsPerJob table. The list of listbox shall be configured
via Row Source property.

If you need any further assistance, please feel free to let's know. We look
forward to your reply.

Best Regards,

Peter Yang
MCSE2000/2003, MCSA, MCDBA
Microsoft Online Partner Support


=====================================================

This posting is provided "AS IS" with no warranties, and confers no rights.
======================================================
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top