Related Tutorials
Create a subform by using the Subform WizardWant to add a subform to an existing form? The Subform Wizard will help you get the job done. You can use an existing form as the subform, or you can have Access create one for you. Watch this five-minute demo to learn how.
Subforms
A subform is a form that is placed in a parent form, called the main form. Subforms are particularly useful to display data from tables and queries that have one-to-many relationships. Learn: What is a subform? How to create a form and subform at once, how to use subform wizard and Drag-and-drop method.
Adding a subform to an existing form
I am trying to add a subform to a form that has an Autonumber primary key. The table already has data in it. In table view,(ie using no forms) the records are added and displayed correctly. When I use the existing form and the new subform to enter data, the auto increment number does not update on the foreign key field (Linked)on the subform. It seems to have a default value of a random number (28). I was trying to implement this on an existing form that never had a subform before.
Set the focus on second field in a subform whenever a record is viewed
In Access 2003/XP/2000/97, I have a form and a subform (master/detail relationship). The main form is in the Form Header section while the subform is in the Detail section. The problem is every time I add a new record, the cursor won't go to the second field in the subform.
Add a Subform in Access 2007
The main form in Access 2007 may have another form inserted into it called a subform. The combination of form and subform may be called a hierarchical form, master/detail form or parent/child form. Subforms are most commonly used to show data with a one-to-many relationship. The following steps will show how to add a subform in Access 2007.
Forms/Subforms
I have got a form with a subform attached, I need to get one field of information from the main form onto the subform. The form name is "Products" and the sub form is named "Products Subform" I need to get "Product Name" information from the main form into a field on the subform called "Product Description" Is this possible?, If so, have you got any idea's how to do this?
Displaying Subform Totals in a Main Form in Microsoft Access
In this article we are going to show you how to display totals taken from your subform, and display these in controls in your main form. We need to be able to reference the subform control from the main Microsoft Access form. If you attempt to sum a subform field by using a calculated control on a main form, you may receive an error message in the main form control.
Referring to Controls on a Subform
Sooner or later, you will need to refer to information in a control on another form - a subform, the parent form, or some other form altogether. Say for example we have a form called "Students" that displays student names and addresses. In this form is a subform called "Grades" that displays the classes passed and credit points earned for the student in the main form. How can the Students form refer to the Credits control in the Grades subform?
Delete Function
I have a main form and within it I have a subform. When I click the delete command it deletes the fields on the main form but not on the subform. This is confirmed by going to the subform table the data is still available. However, on the main form the data is deleted from its respective table
Refreshing data on a child one-many form
I have a one to many relationship on a form/subform. I have buttons on the subform that basically will automatically add a new record to the table the subform is based on. I am using the sql "insert" clause to add the record - which it is dong just fine. However, I have tried the .refresh and .requery commands and neither seem to be able to display the new record automatically in the list. I have to exit the screen and come back in before the new record is displayed. WHat method can I use to cause the new record to be displayed on the child form right away?
AfterUpdate Event question
I have a form with a subform - (datasheet view). The form also has a ComboBox. After a value is selected in the ComboBox the AfterUpdate event will build the new SELECT query, assign it to the subform, then requery the subform. That works fine, but it doesn't save the query. Once I have reviewed the subform and determined that it returned the correct results, I will use FMS Total Emailer to email the results. I can use any table, query, or view to set up the emails. Since the SELECT query is not saved, there is no way to reference it. I would appreciate any ideas on how to either save that query, make a new query, or make a new table that can be referenced from the FMN Total Emailer. ...
ACCCESS DB 2007 Sub Forms
I am building an ACCESS 2007 soccer player database for our countywide soccer league I have the basic structure in place but I neeed to work out the kinks, I have the main form that contains all of the information for each "Family" such as parents, phone numbers, address's, etc. all in a table called "family" and on the main family form I am using a subform to input each players information for that family such as last name, first name, Age, birthday, Height, Weight, Etc. entered into a table called "players". I want to be able to enter the individual player info into the subform, then enter the family specific info into the main form and when I finish entering that particular familys information click save, then click NEW and have both forms clear and be ready for the next family input. Everything works ok except the subform will not clear when the main form does how might I fix this?
Summing values from subForm into main Form
I have a Form that is a list of dates, and a subForm that is all the projects worked on for a given date, with the hours for each. I would like to have a field on my main form that is the total hours on a given date, and I would like this field updated whenever the hours for a project on that date is updated. I have tried some VBA code in the "After Update" box on the subForm, but that does not seam to be working.
Update from Subform
I have a form that displays customer order information, and a subform that show the individual items ordered and not shipped. on the subform I have a check box on each item ordered line. The user can select one or more of these items to ship by checking the check box, and by clicking a command button on the main form. How do I update th order record or records with quantiy shipped based on the check box?
Subforms in MS Access 2007
When I enter a new data record on the master form, the subform still shows the data from the previous record. Why, when I click on the new button doesn't it also clear the data from the subform and what can I do to accomplish that?
Create a subform by dragging one form onto another form
You can add a subform to a form just by dragging one form from the Navigation Pane onto another form. However, the two forms might not link up the way you want. Watch this video to get some troubleshooting tips.
Duplicate the record in form and subform
How to duplicate the current record on a form in a Microsoft Access database, along with the related records in the subform.
How to: Call Procedures in a Subform or Subreport
Learn how to call a procedure that is stored in a subform or subreport form the main form or report.
cbo box to subform + add records
I want to have a combo box select a record and display that record's information in the subform. This can be based directly on the table, or from a qry (I already have a query because I use an expression for a concatenated lname & fname & dob elsewhere). I've accomplished this by having the cboSelectedPatient on the main form, and appropriately linking the master & child link properties, and requerying "On Update". ...
Controlling when Scroll Bars are displayed on a SubForm
On occasions, and to improve the look of your forms, you may only wish to display scrollbars in a subform if there are a certain amount of records contained. If for example in an Order Entry database, a Customer can have many Orders however there are going to be occasions where a single customer may only have one or two orders. In this case, we can hide the Vertical Scroll Bar as there is no need for it to be visible.
Display a particular subform based on a combo box selection
In 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.
Forms and SubForms
I have a Form that is a list of dates, and a subForm that is all the projects worked on for a given date, with the hours for each. I would like to have a field on my main form that is the total hours on a given date, and I would like this field updated whenever the hours for a project on that date is updated. I have tried some VBA code in the "After Update" box on the subForm, but that does not seam to be working.
Referencing a Subform
Part-2 video tutorial, learn Referencing a Subform. (video tutorial)
Subforms
The advantages of forms within forms, Creating the main form, Creating the subform, Linking the main form and subform, Linking forms and subforms manually, Non-synchronized forms, Aesthetic refinements. (pdf file, install Acrobat Reader to read this tutorial).
Refresh the contents of a subform whenever the record in the main form changes
In Access 2003/XP/2000/97, how do I refresh the contents of a subform whenever the record in the main form changes?
Popup Calendar in a form/subform
I'm using Access 2003/XP/2000/97, can you explain to me how to create a popup calendar in a form and also how to create a popup calendar in a subform?
SubForm-2nd Subform Combo box Question
I have a combo box on a sub form. Based on the choice, I want another combo box on the sub-sub form to have a selected choice. I've tried to have the choice change the Row Source on the 2nd combo box but I've been unsuccessful. Both of the combo boxes are bound, so cascading them didn't work.
How to: Hide a Subform if the Main Form Contains No Records
Learn how to hide a subform when its main form contains no records.
Load Subforms Dynamically
Subforms are one of the great features of Microsoft Access. If you have ever tried to replicate the Form/Subform paradigm of Access in Visual Basic, you will appreciate how simple the process really is. 1. Create the master form 2. Create the child form 3. Drag child form and drop on master form 4. Set the Link Master Field and Link Child Field properties
Using Visual Basic for Applications
As you work with Access, there may be times when you can't write a macro that's capable of performing the operations you need. In such cases, you can turn to Visual Basic for Applications, a programming language that's built into Access. In short, using Visual Basic for Applications, you specify a list of instructions you want Access to perform. By the time you finish this chapter, you will understand the following key concepts: what Visual Basic for Applications is, how Access uses procedures, functions, and subroutines, the parts of a Visual Basic for Applications program, how to use statements, variables, operators, and functions within your program, how to address database objects in Visual Basic for Applications, how to use the VBA Editor, how to develop a Visual Basic for Applications procedure, how to test your procedures and how to use a procedure from an Access form.
The advantages of forms within forms
A columnar (single-column) main form with a tabular subform is a natural way of displaying data from tables that participate in a one-to-many relationship. (pdf file, install Acrobat Reader to read this tutorial)
Populate subform data automatically (one to many relationship)
I have an Access 2003/XP/2000/97 database that is used to record the materials transferred from our workshop to the head office. The material has a particular number assigned (serial number). For each serial number, you can enter 24 items.
Access 2000
How to create an Access 2000 database including two related tables, a form/subform for entering data into both forms and a report which displays the data from both tables.
Multiple subforms sharing 1 calendar
I have few subforms on a main form and they all use different dates. I like picking dates off of a pop-up calendar. On individual forms, this is no problem. But I don't want to allocate space on each subform for a pop-up calendar. Please tell me that this is an easy fix.
Advanced Programming Concepts
Learn Scoping and Object-Naming Compatibility; Custom Methods and Properties; Improvements in Compilation Performance; Macro Actions and Methods of the DoCmd Object; Using Enumerated Constants in Microsoft Access 2002 and Later; Comparison of Data Types; Call Procedures in a Subform or Subreport; Program with Class Modules.
Combo Box Function in Forms
I am trying to display records in my subform (projects) using my combobox in my main form (clients) so that I do not have to scroll through my whole list of clients to get to a certain project record. However, when I use the combo to select a client, it just changes the cient - it does not go to the project(s) that relate to that client. Can you help me? Does this need a filter function to complete this task or something else?
MS Visual Basic for Applications
How to use Visual Basic for Applications (VBA) with MS Office tools, including VBA for MS Excel, VBA for MS Word, VBA for MS Access, and a general overview of Microsoft Visual Basic for Applications.
Filter a Form on a Field in a Subform
The Filter property of forms (introduced in Access 95) makes it easy to filter a form based on a control in the form. However, the simple filter cannot be used if the field you wish to filter on is not in the form.
Filter a Form on a Field in a Subform
The Filter property of forms (introduced in Access 95) makes it easy to filter a form based on a control in the form. However, the simple filter cannot be used if the field you wish to filter on is not in the form.
Microsoft Access Tutorials
These tutorials (courtesy M. Brydon) are in Adobe Acrobat PDF format. You can download them individually or as a set. To view the files, you need the Acrobat Reader, which Adobe provides at no charge. Topics included: Introduction to Microsoft Access, Tables, Relationships, Basic Queries Using QBE, Basic Queries using SQL, Creating Basic Forms, Parameter Queries, Advanced Forms, Action Queries, An Introduction to Visual Basic, Event-Driven Programming Using Macros, Subforms, Data Access Objects, Advanced Triggers, Combo Box Controls

Report
Adobe Fireworks
Adobe Flash
Adobe Illustrator
Adobe Image Ready
Adobe Photoshop
3D Studio Max
Cinema 4D
Maya 3D
Microsoft Excel
Microsoft PowerPoint
Microsoft Word
Microsoft Access
MySQL
C and C++
Python
Visual Basic
.htaccess
Adobe DreamWeaver
ASP
CGI & Perl
CSS
Java
JavaScript
Microsoft FrontPage
Windows Vista
Windows 7