Subforms

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,
I'm hoping someone can shed some light on a particular problem I'm having
with a form. I have a database that has been functioning well for quite a
while. Now I need to use the same database and rearrange some aspects as to
how it works. Currently, there is a main form with company info, a subform
with quote heading info, and a subform in datasheet view that lists and
calculates all parts to be quoted. No problem - a list of parts with one
quoted amount.

Now I need to have same forms but the quote will sometimes have several line
items with list of parts to make up each line item quoted amount. Can
someone please tell me how to go about having a list of parts in the second
datasheet subform and each be separate for each line item? I hope this is
clear enough to understand what I'm trying to do. As always, any help is
much appreciated.
Thanks,
Pam
 
If I am reading this correctly, you want your subform to look something
like this:

Item A $10
Item B $25
Item C $50

and so on. Am I right?

If that's what you want, it seems to me that all you would need to do
is include the individual item amount in the query for your subform.
It already lists the items, now just include the item amount. Sorry if
I'm not understanding your post.
 
Jeff, thanks for replying. I thought it might be hard to understand exactly
what I'm trying to do. Let me try to explain again. I have 2 subforms that
are on a Main Form with customer info.
Quote Subform 1 will include:

Item Qty Description Price
1 1 Package 1 1,000.00

Quote Subform 2 will include:
Part # Qty Desc Cost Price
Part1 1 Part 1 10.00 50.00
Part2 1 Part 2 20.00 100.00

The subform 2 will have a list of parts that are calculated to make up the
price for Package 1 on the Quote Subform 1 of 1,000.00. I have all this
figured out. What I want to be able to do is have a second line item on the
Quote Subform 1 for Package 2 and have Subform 2 list the parts that make up
Package 2 and all still be tied to the one job number on my main form.

Thanks again for your help.
Pam
 
Ok. Are you wanting to select the package in Sub1 and show the parts
in that package in Sub2? This is a little difficult for me to assist
you since I don't know how you are linking your forms and subforms
(what field), or how your tables are structured. I'll do my best!

If your parts and packages are joined to the main form on Job ID, you
won't be able to separate out Package 1 from Package 2 by clicking on
it. Your Parts would need to be associated to the Package by something
other than Job ID, like PackageID or something. Then in the Parts
subform, your query for it would have
Forms!MainFormName!SubForm1!PackageID in the PackageID field. Then in
your Subform1 properties, put Forms!MainFormName!Subform2.Requery in
the On Current event property of the form.

If all you are wanting is to show all the parts for both packages in
the list, then all you should need to do is add the information to the
record however you have that designed in your database.

Does that help at all?
 
Back
Top