This is often seen when viewing a form with a recordsource, and using a subform to show the related records in a subform. In Microsoft Access 1.x and 2.0, set the forms DefaultEditing property to Data Entry. Then based on the value chosen in the Template Type combo box, we've hidden the subforms that we don't want to see. Subforms in Access provide a powerful way to easily see one-to-many relationships without writing code, using the LinkMasterFields and LinkChildFields properties. If the user clicks the Cancel button, the Cancel argument is set to True (1), which moves the focus to. This class teaches you the basics of SQL (the language behind all of the queries in your database), form footer totals, subforms, and lots more. The Exit event procedure displays a dialog box asking the user if changes should be saved before the focus moves to another control. Expert Microsoft Access Tutorial - 1 Hour, 26 Minutes This Microsoft Access video tutorial picks up where Expert Level 2 left off. We've created all 3 subforms on our main form (frmJobs) - with each subform being placed on top of the next. The Enter event procedure displays a message specifying what type of data the user can enter in the text box. In our example, we have 3 subforms called frmJobs_Customers_sub, frmJobs_Employees_sub, and frmJobs_Supplier_sub.
and so on.Īnswer: We've provided a download to demonstrate how you can select a value from a combo box and then display a particular subform. When I select "Employee" in the combo box, I want to display the Employee subform. The Subform is based on the same table as the main form. This Access form has a Subform that should, if the salesperson opens it, show ALL contacts for this salesperson.
Question: In Microsoft Access 2003/XP/2000/97, I need to figure out how to display a particular subform on a main form (I have 3 subforms) based on a combo box selection.įor example, when I select "Customer" in the combo box, I want to display the Customer subform on the main form. I created an Access Form based on a table used for our sales personal to enter new contacts. This MSAccess tutorial explains how to display a particular subform based on a combo box selection in Access 2003 (with screenshots). MS Access 2003: Display a particular subform based on a combo box selection