View Full Version : Adding field data through form/subform


mjwillyone
12-02-2005, 01:13 PM
I am creating an Access database that I want to be able to use to change a header table and its associated detail table. I have created a fmain-form that shows the header table fields. This form also has a subform which shows the detail records which are linked to a field in the header table. One header may have many linked detail records from the detail table. I have been able to easily enter information into the detail records that are shown in the subform.

I would like to know how I can add new detail records directly on the subform so that they will automatically pick up the correct header field from the main form. This way I know that the record I add to the sub-form with be linked to the open record of the main form.

Also, I would like to learn a way to sum all of the values of one of the fields shown in the sub-form and place it on the main-form. How can I do this so that I only sum those values that are in the sub-form that are linked to the open man-form record... not sum all of the values from all of the records in the database?

Thank you in advance for your help.

Mike

SQL_Hell
12-05-2005, 03:50 AM
Hi Mike,

Did you eman to post this in the sql server forum?

as the problem you describe sounds like it should be posted in access/ forms forum

mjwillyone
12-05-2005, 04:56 AM
Yes, I thought that this might have as much to do with the SQL as it does Access.

SQL_Hell
12-05-2005, 05:11 AM
SQL server and SQL are two different things

mjwillyone
12-05-2005, 06:34 AM
Yes, I know they are two different things. Thought, though, that since I was working directly with the server files, I should probably post this here. Don't worry about it ... I just posted the same question to the Access Forms forum.