Subform data staying with record in main form?

G

Guest

I enter service records into a form. It contains a subform for parts and
hours. The data in the subform needs to stay with that record only, even if
there are mulitple records for a particualr date. What it's doing now is
applying that subform data to all records with the same date as the date in
the subform. How do I make this stop and keep the subform data for each
record as entered?
 
J

John Vinson

I enter service records into a form. It contains a subform for parts and
hours. The data in the subform needs to stay with that record only, even if
there are mulitple records for a particualr date. What it's doing now is
applying that subform data to all records with the same date as the date in
the subform. How do I make this stop and keep the subform data for each
record as entered?

What is the Recordsource property of the Subform? And (probably more
important for this issue) what are its Master and Child Link Fields?

John W. Vinson[MVP]
 
G

Guest

The record source is the table that I used fields from to make the main form.
The master/child lines are blank in my subform properties. Since my primary
key is the 'SO' field in my table and the main form is autonumbered in the
'SO' field, do I need to have an 'SO' field in my subform that is child to
the 'SO' master in my main form? If so, how/where do I do that? Each
subform needs specific info relating only to that record in the form--which
is connected by the SO# to the table.

Thanks!
 
J

jahoobob via AccessMonster.com

Sounds like one Service can have many Parts. If that is the case, you need
one table for the Service records and another table for the Parts for the
Service. You are right on concerning SO as the link between the two tables
in your form. You will have a unique SO for each Service but you can have
more than one Parts (I know that doesn't sound/look right but I'm calling the
one table Parts) with the same SO. The Main form (Service) needs to be a
Single form and the subform (Parts) needs to be Continuous. Once you incet
the subform i the main form, open the properties of the subforma and you will
see the Link properties. Select the ellipsis at the right of one of the
boxes and you will be able to select SO as Parent and Child.
Hope this helps,
Bob
The record source is the table that I used fields from to make the main form.
The master/child lines are blank in my subform properties. Since my primary
key is the 'SO' field in my table and the main form is autonumbered in the
'SO' field, do I need to have an 'SO' field in my subform that is child to
the 'SO' master in my main form? If so, how/where do I do that? Each
subform needs specific info relating only to that record in the form--which
is connected by the SO# to the table.

Thanks!
[quoted text clipped - 7 lines]
John W. Vinson[MVP]
 
G

Guest

Yea! It worked!! Thanks!!

(but I still hate Access ;>)

jahoobob via AccessMonster.com said:
Sounds like one Service can have many Parts. If that is the case, you need
one table for the Service records and another table for the Parts for the
Service. You are right on concerning SO as the link between the two tables
in your form. You will have a unique SO for each Service but you can have
more than one Parts (I know that doesn't sound/look right but I'm calling the
one table Parts) with the same SO. The Main form (Service) needs to be a
Single form and the subform (Parts) needs to be Continuous. Once you incet
the subform i the main form, open the properties of the subforma and you will
see the Link properties. Select the ellipsis at the right of one of the
boxes and you will be able to select SO as Parent and Child.
Hope this helps,
Bob
The record source is the table that I used fields from to make the main form.
The master/child lines are blank in my subform properties. Since my primary
key is the 'SO' field in my table and the main form is autonumbered in the
'SO' field, do I need to have an 'SO' field in my subform that is child to
the 'SO' master in my main form? If so, how/where do I do that? Each
subform needs specific info relating only to that record in the form--which
is connected by the SO# to the table.

Thanks!
I enter service records into a form. It contains a subform for parts and
hours. The data in the subform needs to stay with that record only, even if
[quoted text clipped - 7 lines]
John W. Vinson[MVP]
 
G

Guest

Wait! One more question. I have 'Time In' and 'Time Out' 'Total Time'fields
in my subform, as well as multiple parts with $ amounts. The total time
expression is in the subform. How do I add the total time per worker from the
subform on the main form, and put a total for the parts listed on the subform
on the main form?

Thanks!
Laurel

jahoobob via AccessMonster.com said:
Sounds like one Service can have many Parts. If that is the case, you need
one table for the Service records and another table for the Parts for the
Service. You are right on concerning SO as the link between the two tables
in your form. You will have a unique SO for each Service but you can have
more than one Parts (I know that doesn't sound/look right but I'm calling the
one table Parts) with the same SO. The Main form (Service) needs to be a
Single form and the subform (Parts) needs to be Continuous. Once you incet
the subform i the main form, open the properties of the subforma and you will
see the Link properties. Select the ellipsis at the right of one of the
boxes and you will be able to select SO as Parent and Child.
Hope this helps,
Bob
The record source is the table that I used fields from to make the main form.
The master/child lines are blank in my subform properties. Since my primary
key is the 'SO' field in my table and the main form is autonumbered in the
'SO' field, do I need to have an 'SO' field in my subform that is child to
the 'SO' master in my main form? If so, how/where do I do that? Each
subform needs specific info relating only to that record in the form--which
is connected by the SO# to the table.

Thanks!
I enter service records into a form. It contains a subform for parts and
hours. The data in the subform needs to stay with that record only, even if
[quoted text clipped - 7 lines]
John W. Vinson[MVP]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top