Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Add new record to sub-form?

Status
Not open for further replies.

RageMatrix

Programmer
May 25, 2003
11
GB
Hey all,

This is a little involved, so please bear with me! I've got a parent form which displays customers and a sub-form which displays many child records for each parent record on the main form. This gets its information from a query which lists all child records for all parent records (SELECT *, basically)
I used the sub-form/report wizard in the form designer to create the sub-form so that it only displays the child records which are related to the current parent record. The sub-form is a datasheet view. Now, when you're viewing a table in this view, you can automatically add new records by clicking on the "empty" row under the last record. I would like to do this in the form, but this does not work as the form seems to be read-only. Access does not give any error messages or any information why this should be the case.

How can I add new records to the child form in the datasheet view? Is this not allowed because the sub-form is based on a query or is it something that the sub-form/report wizard does?

Any ideas anyone?

Thank you.

Jon.
 
I did not go thru your question but will try to ans what the title asked. I usually set up a form with the subform's data - exactly. Then open that form with a "Details' button. From this new form, I can change the data or add data - being careful to maintain the data criteria of the subform data. Then on exit, I requery the subform and voile' the adds/ subs and mods are there.

rollie@bwsys.net
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top