| re: adding a record into a sub-form
Richard Hollenbeck previously wrote:
[color=blue]
> I'm getting errors. Access is telling me that it can't add a record.[/color]
To what - the main form or the subform? (I'm assuming it's the subform)
What is the message and when do you get it?
[color=blue]
> I
> have a table of college courses and a linked table of groups of
> activities
> in that course as a linked table (one course to many groups of
> activities).
> "Groups" include things like Participation, Exams, Essays, Etc., Etc.,
> Etc.
> I have a main form showing the course information (courseID,
> courseDescription, courseStartDate courseEndDate, etc.) and a sub-form
> showing the individual groups within that particular course. The
> sub-form
> doesn't show the courseID because it's obvious; it's the current course
> in the main form.
>
> How do I send the courseID of the current course into the group table's
> corresponding field?[/color]
If the subform is based on a table or a simple query of that table then as
long as the mainform-subform link is correct this should be ok. The
courseid value should be entered automatically.
If this is not working then look at the form subform links to be sure you
are using the courseid as the master and child link field.
Another possibility is that the query for the subform is too complex and
is not updateable. If you run the query on its own can you add/edit
records?
Other less likely possibilities are that the subform is set to
AllowAdditions = No (you would not be able to go to a new record) or that
the subform control is locked (you could get to new record but not enter
anything)
Peter Russell |