Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Forms & Subforms

Status
Not open for further replies.

glove

Technical User
Aug 24, 2000
42
0
0
US
I am trying to created a form in access which will contain two datasheets. The 1st datasheet will display data from a table with main account numbers. The 2nd datasheet will display data from a table with sub account numbers. I would like to be able to select a main account number in the 1st datasheet and have the 2nd datasheet display all sub accounts under that main account. I would also like to be able to enter/edit/delete from both datasheets. Any help would be appreciated. Thanks.
 
Do you have the two tables set up? If so, go into Tools references and create the relationship between them. Then use the Form wizard to create your table. On the first page, choose your Form Wizard from the choices and your main acct number table from the drop down list. On the next page, choose the field you want from the main account table and then change the table, so that the sub account table is shown and choose the fields you want from there.

Access will build the form/subform relationship automatically, based on the relationship you defined in Tools...Relationships

 
Once you have set up the relationships correctly between the 2 datasets try creating the master form as a continuous form then create a subform using the second dataset also as a continuous form. Access will report that you can't do this and change the first form to single. After doing this if you then change the main form as continuous (in design mode),save it and then run it you will have two linked continuous forms displaying together. As you move through the main form record the subform records will change appropriately!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top