Hi everyone! In Access 97, I have a parent form and a subform that
are both based on the same query. The main form is continuous and
serves up a summary for each record. The subform provides details on
the record and is linked to the parent record via an autonumber ID.
My users want to be able to add new records to the table underlying
the main query (the query is structured so that new records can be
added via its database view). I added an "Add New" button on the
subform that calls "DoCmd.GoToReco rd , , acNewRec". The button works
fine, but upon dirtying the form, I get the error: "You can't assign a
value to this object", suggesting that the form may be in read only
mode, or is open in design-view, or value is too large for the field
-- none of these are true.
After the error msg, I can enter values as I please and it is
correctly saved to the underlying table.
Any ideas as to why I getting this error (I suspect it is because the
link between the forms is broken as the main form is currently on a
pre-existing record, while the child form is on the new record). More
importantly, any ideas as to how to get Access to do this without
complaint?
Thank you for any suggestions you may have. This newsgroup has been a
treasure trove of altruistic experts.
Alan
are both based on the same query. The main form is continuous and
serves up a summary for each record. The subform provides details on
the record and is linked to the parent record via an autonumber ID.
My users want to be able to add new records to the table underlying
the main query (the query is structured so that new records can be
added via its database view). I added an "Add New" button on the
subform that calls "DoCmd.GoToReco rd , , acNewRec". The button works
fine, but upon dirtying the form, I get the error: "You can't assign a
value to this object", suggesting that the form may be in read only
mode, or is open in design-view, or value is too large for the field
-- none of these are true.
After the error msg, I can enter values as I please and it is
correctly saved to the underlying table.
Any ideas as to why I getting this error (I suspect it is because the
link between the forms is broken as the main form is currently on a
pre-existing record, while the child form is on the new record). More
importantly, any ideas as to how to get Access to do this without
complaint?
Thank you for any suggestions you may have. This newsgroup has been a
treasure trove of altruistic experts.
Alan
Comment