How do I link a subform to the main form? I have textboxes that are linked up to the forms source. I want to be able to click on the record down in the subform and it should link up with the main form and fill in the linked textboxes.
Main forms represent the primary data (based upon the "one", while subforms represent the related (foreign) data. Typically, the main form displays a single record, while the subform displays all related information.
The method used depends upon the version of Access you are using. In both versions, you must have a common field in both forms. If that is the case..
Access 97 (although it still works in 2000
1.Open the Main form in design view.
2.Press F11 to display the main window.
3.Display the main form and main window side by side.
4.Go to the "Forms" section.
5.Drag the form name (do not open it) onto the main form.
6.Position it as desired.
7.Open in Form view.
For this to work, forms must have a common field, and the commmon field in the primary table must be a primary key field. If this is so, the links will be automatic.
There are other methods as well. For example, you can set the Master and Child links in the form properties. In Access 2000, there is a "Subform/Subreport" wizard that walks you through the linking process as well. This is found on the "Toolbox" toolbar in the design view of the main form.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.