A form inside a form ??

AlfredNor

Registered User.
Local time
Today, 01:40
Joined
Sep 18, 2002
Messages
47
How do I set up a "form inside a form" like in the MS Access example template called "Service Order Manager ?"

I say "form inside a form" (see attatched pic) because when I put the "Service Order Manager" db into design view , the object which allowed ongoing entries looked another form. How do you to put that in there?

I realize that another form& table has to be made, but the actual IMPORTING of the object into the master form as me stumped. I checked its properties and Im seeing a Query that has certain fields checked which are the ones that show up on the master form.

So how to I get everything to point to each other and show up on the form?

(I could just add static fields if there werent possibly an infinite number of entries needed for every customer)

This is the most important part of my project...so if anyone can explain this "form inside a form" Id be forever grateful.
 

Attachments

  • form.jpg
    form.jpg
    83.9 KB · Views: 802
Last edited:
This is called a subform. To enable you to set up this type of main form/subform structure, you need to make sure your table structure is correct. You need a one to many relationship, ie one customer can have many orders. The two tables would be linked by the customer id number. If you've got the relationship between the two tables correct it should be easy enough to create the form/subform. The form wizard would do it for you, take the field from the one table and then the fields from the many table and the wizard should create a form/subform. Alternatively, open the main form in design view. Make sure the wizard's wand on the Toolbox toolbar is depressed. On the Toolbox toolbar you have a subform/subreport button. Click that then move the cursor to the main form, where you want the subform to be, draw a box and the wizard will kick in and help you do your subform. Follow the instructions and either create the subform direct from the many table or from an existing form and link the two forms by the Customer ID (for example, you specify whatever your linking field is) field.

HTH shout if you get stuck.
 
GREAT!!!!! now..

Ok...THANK YOU! (bow) (bow)

Now...

I need to sum the values of one of the fields in the subform BASED on a value in another field.

Im thinking I use the DSum(expr, domain[, criteria]) model.

First question is the comma REALLY supposed to be inside the [ ]?
Second question can the criteria be coded like an expression (i.e. using other field names) rather than just criteria for this field?

Is this possible?

= DSUM ("Ref Amt" , "Referral Table" [,"Ref Date"< "ApplyDate"])
so that it ONLY sums Ref amts in records that have a Ref Date before its own Apply date?
 
Last edited:
Please don't post the same question under more than one topic, either continue with the existing one, or post a new one
 

Users who are viewing this thread

Back
Top Bottom