By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,847 Members | 3,081 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,847 IT Pros & Developers. It's quick & easy.

Error when Adding Record to Linked Subform

P: n/a
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.GoToRecord , , 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
Nov 12 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
I've tried a few more things and I've discovered that if I unlink the
parent and child forms, the add button works fine. But if I filtered
the main form on some criteria, and then tried the add new button, I
would get a "You cannot go to the specified record. You may be at the
end of a recordset." error; after which the main form becomes
unfiltered and clicking on the add new button has the desired result.

Any ideas?

Alan
Nov 12 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.