A Form As a Field? =\

  • Thread starter Thread starter jillian.calderon
  • Start date Start date
J

jillian.calderon

First, I have a main form. In this form you add all of the product
information. Everything is happy. However, now, I need to add something
else. I need to add Pricing History to the form in a special way.

Pricing History has the following fields: Pricing ID, Product ID,
Effective Date, MRC, and NRC
Each Product will have, at most, five Pricing History entries.
The Pricing History is displayed as a subform within the Product form.
Does that make sense? Each Product will have it's own unique Pricing
History subform.
I haven't a clue on how I should begin. Can anyone help?

Thanks,
Jillian
 
Jillian:

Presumably you have a Products table with one row per product and a primary
key ProductID column. Base your existing form, in single form view, on this
table or better still a sorted query on the table. Then design a form in
continuous form view based on a query on the PricingHistory table sorted in
descending date order so the latest price appears first. Add a subform
control to the Products form with the PricingHistory form as its Source
object. With the main form in design view set the LinkMasterFields and
LinkChildFields properties of the subform control to ProductID.

Whenever you are at a record in the main form you'll see the pricing history
records for just that product and when you enter a new row in the subform it
will automatically be given the current ProductID of the main form's current
record.

Ken Sheridan
Stafford, England
 
First, I have a main form. In this form you add all of the product
information. Everything is happy. However, now, I need to add something
else. I need to add Pricing History to the form in a special way.

Pricing History has the following fields: Pricing ID, Product ID,
Effective Date, MRC, and NRC
Each Product will have, at most, five Pricing History entries.
The Pricing History is displayed as a subform within the Product form.
Does that make sense? Each Product will have it's own unique Pricing
History subform.
I haven't a clue on how I should begin. Can anyone help?

Well, you've described your own answer.

Use a Form based on the product table; use the Subform tool on the
toolbar to add a subform based on the Pricing History table. Use the
ProductID as the master/child link field.

You don't need separate SUBFORMS for each product - as you move from
product to product in the main form (which must be in single form
view, not datasheet or continuous), you'll see the data appropriate
for that product in the subform.

John W. Vinson[MVP]
 
Neat. Thanks a lot. Now, I just need to figure out how to allow the
user to modify and delete the subform while it's in the form. I may
have questions about that later. For now...
Thanks Again!
Jillian
 
Neat. Thanks a lot. Now, I just need to figure out how to allow the
user to modify and delete the data in the subform while it's in the
form. I may
have questions about that later. For now...
Thanks Again!
Jillian
 
Neat. Thanks a lot. Now, I just need to figure out how to allow the
user to modify and delete the subform while it's in the form. I may
have questions about that later. For now...
Thanks Again!
Jillian

You don't need the user to "modify and delete the subform" if that
means the structure of the Form object. (Well, for some really
advanced users that you would trust with your car keys, your bank
account, and your job prospects, maybe...)

If the Subform is a normal unmodified one, though, it's just a window
onto the data in its underlying table. They can edit the data in the
Table using the Subform as a tool.

I think you may still be in the mindset that "the form is the data,
the subform is what the user is changing". It's NOT. A Form (or
subform) is *just a window*, a tool which allows interaction with the
data stored in Tables.

John W. Vinson[MVP]
 
Jillian:

Nothing to figure out really. You just use the embedded subform exactly
like a standalone form. To delete a row just select it in the subform and
click the delete button on the toolbar; to modify its data just edit it as
you would any form.

Ken Sheridan
Stafford, England
 

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

Back
Top