I have three tables, Owners, Parcels, and Ownership. Owner has and Owner_ID
and several fields of owner information. Parcel has a Parcel_ID and several
fields of information. Ownership is a junction table that matches these two
IDs.
I have created a form that displays the owner data in the main form and then
all of the parcels for that owner in the subform. I would like to be able to
add new parcels in the subform. When I try to do this, I get an error
message, "Field cannot be updated."
I checked the control properties, and the subform and its controls are not
locked.
Can anyone suggest what I can do to be able to add records to the subform?
Thank you.
|
|
0
|
|
|
|
Reply
|
Utf
|
1/8/2008 9:23:01 PM |
|
On Tue, 8 Jan 2008 13:23:01 -0800, danftz <danftz@discussions.microsoft.com>
wrote:
>I have three tables, Owners, Parcels, and Ownership. Owner has and Owner_ID
>and several fields of owner information. Parcel has a Parcel_ID and several
>fields of information. Ownership is a junction table that matches these two
>IDs.
>
>I have created a form that displays the owner data in the main form and then
>all of the parcels for that owner in the subform. I would like to be able to
>add new parcels in the subform. When I try to do this, I get an error
>message, "Field cannot be updated."
>
>I checked the control properties, and the subform and its controls are not
>locked.
>
>Can anyone suggest what I can do to be able to add records to the subform?
>
>Thank you.
>
>
I presume that the Subform is based on the Ownership table?
You've got a couple of possibilities. One would be to have a Combo Box on the
subform, with the Parcels table as its RowSource; set its Limit to List
property to Yes, and use VBA code in its NotInList event to add a new parcel
as necessary. See the sample code at http://www.mvps.org/access (search for
NotInList) for an example.
Or you may be able to base the subform, not on the Ownership table, but on a
Query joining Ownership to Parcel:
SELECT Ownership.Owner_ID, Ownership.Parcel_ID, Parcels.Parcel_ID,
Parcels.ParcelName, <other parcels fields as needed>
FROM Parcels LEFT JOIN Ownership
ON Parcels.Parcel_ID = Ownership.Parcels_ID;
Assuming that Parcels.Parcel_ID is an Autonumber field, and that you include
both tables' instances of Parcel_ID, Access' builtin "row fixup" feature will
let you enter a new parcel in this query, and it will automatically fill in
the record in both tables.
John W. Vinson [MVP]
|
|
0
|
|
|
|
Reply
|
John
|
1/9/2008 12:10:38 AM
|
|
|
1 Replies
858 Views
(page loaded in 0.022 seconds)
Similiar Articles: Unable to add a new record in a subform datasheet - microsoft ...Button to Add Record to subform from main form - microsoft.public ... Unable to add a new record in a subform datasheet - microsoft ..... that displays the owner data ... Can't delete datasheet subform record in Access 2007 ...Unable to add a new record in a subform datasheet - microsoft ... Can't delete datasheet subform record in Access 2007 ... Unable to add a new record in a subform ... Wizard unable to open form in Form or Datasheet view - microsoft ...Unable to add a new record in a subform datasheet - microsoft ... Wizard unable to open form in Form or Datasheet view - microsoft ... record from a form - microsoft ... First line of datasheet view is new record - microsoft.public ...Wizard unable to open form in Form or Datasheet view - microsoft ... First line of datasheet view is new record ... To add a record to a subform ... To start a new line in ... Unable to Edit/Add records on Form in a New ADP - microsoft.public ...I built a form and subform from scratch, but I'm unable to edit or add records. ... forms ... in Form view or Datasheet view. Click Add (the user can add new records ... Add new record to master and subform at the same time. - microsoft ...Experts: A bound form X contains a bound subform Y and they are linked via Child/Master ... Unable to add a new record in a subform datasheet - microsoft ... Go to the last-new row in a datasheet view - microsoft.public ...Unable to add a new record in a subform datasheet - microsoft ... Go to the last-new row in a datasheet view - microsoft.public ... Unable to add a new record in a subform ... Cannot add records to subform - microsoft.public.access.forms ...Unable to add a new record in a subform datasheet - microsoft ..... cannot be updated." > >I checked the control properties, and the subform and its controls are not ... Datasheet View Record to be displayed in a Individual Form ...Unable to add a new record in a subform datasheet - microsoft ... Wizard unable to open form in Form or Datasheet view - microsoft ... Unable to add a new record in a ... ... code to allow edits in form AND subform - microsoft.public.access ...Unable to add a new record in a subform datasheet - microsoft ... code to allow edits in form AND subform - microsoft.public.access ..... Form.AllowEdits = True PC ... Unable to add a new record in a subform datasheet - microsoft ...Button to Add Record to subform from main form - microsoft.public ... Unable to add a new record in a subform datasheet - microsoft ..... that displays the owner data ... Unable to add new records to a filtered subform based on qeury.If you add a subform to a form and have it displayed as a datasheet, that subform ... no GROUP BY's), then I am unable to add any new records to the subform ... Unable to add new records to a filtered subform based on qeury.Unable to add new records to a filtered subform based on qeury. ... to a form and have it displayed as a datasheet, that subform becomes ... Programmatically add new record in subform in datasheet view ...Keywords: Programmatically, add, new, record, in, subform, in, datasheet, view. Subform Datasheet; Datasheet and subform; Vertical Scrollbar on Datasheet Subform Can't add new record DataBase - DataBase Discussion List Tuesday ...Today, I am unable to add a new record to two of the 5 tables ... If I look at the form in datasheet view there no empty line at the bottom to add another record either. 7/29/2012 11:50:09 AM
|