Topics Search

Subforms : Creating Parent and Child Forms

Subforms : Creating Parent and Child Forms
Views: 576
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.
Sponsored Links:

Similar posts...

 

A2007 ADP/SQL Parent Child form

A2007 ADP/SQL Parent Child form Icon
Access 2007 ADP/ SQL Server 2005 BE / Win7 x64

Most of my app will have a lot of parent/child forms. My question is what is the best preferred method of first creating the parent record and obtain the ID and pass to the child datasheet record.

Just curious to see what I need to do before I spend a lot of wasted time on a wrong method.
 

MDI Parent - Child Form?

MDI Parent - Child Form? Icon
I'm working on a 3 tier payroll application.

I am suppose to open every child form into the parent form .I.e. if I click on any button to open a form, a new parent window with complete menus should open and in the middle the child form will be displayed. This should happen in case of opening any forms.

If I open an employee form, parent window should be displayed with it. likewise with all other forms.
 

Need help with parent child query

Need help with parent child query Icon
I have a table as below. It only has one child level

ID | Name | | Parent
1 | KSP | | 0
2 | PSP | | 0
3 | HJI | | 1
4 | MXM | | 2

I want the output like : basically all parent should follow their child and order on parent name

ID | Name | | Parent
1 | KSP | | 0
3 | HJI | | 1
 

On child form create bound list box to show related records from parent form

On child form create bound list box to show related records from parent form Icon
I have two tables with a many-to-many relationship which is causing many problems. My parent and child forms are linked via a junction table. I want to make it possible to create aread-only version of the child table so that you don't have to link to it from the parent table.

A form linking the two together has been created with a combobox where you can pick and choose which records relate to each other.

I'd like on the child form there to be a list box or combo box which shows the records from the parent table linked to that record from what is picked within the comboboxes of the "junction form".

In essense it would mean that people reading the child form would know which names the record is based on if they didn't want to go via the parent form to read it.
 

How to find the most recent inserted auto number is?

How to find the most recent inserted auto number is? Icon
In one of the forms is a Parent / Child situation. The program inserts the parent then allows the children to be inserted or updated. The parent and children are related by an autonumber database table column called CustomerID. After a parent is inserted into the database I would like to find out what that autonumber ID is so I can use it for the child data.
 

Translating Excel Formula to Access

Translating Excel Formula to Access Icon
I am new to this forum and extremely new to access so please forgive my faults. I am currently in the process of taking an excel spreadsheet and creating an access query that mimics it and its formulas.

I have been successful in replicating the formulas within access so far, until recently. I have a formula in excel that adds up the quantities of children items and displaysit on the parent item

Example of child/parent

Parent
8-8-12 3041535 DriftCat_P | (child) 8-8-12 3041535 DriftCat_P | (child)
8-8-12 3041535 DriftCat_P | (child)

My formula would display the quantity of the children on the parent item line

Here is the formula:
 

Master/Child between Subforms

Master/Child between Subforms Icon
Let's say that A is the mainform. B and C are subforms each within A. Neither B nor C are subforms within the other. Is it possible to create a Master/Child relationship in which afield within B is the Master and a field within C is the child?

If so, is it possible to accomplish this if both B and C are displayed in Datasheet view?
 

parent child link query

parent child link query Icon
I have a query which has a parent and child link tables and would like to have all the records in the parent even no child for this parent.

It seems MS Access gives the link only the parent has child. I try to use outer join, but MS Access gives me it contains ambiguous outer joins.
 

How To Find A Parent Their Children (If They Have Any) Using VBA?

How To Find A Parent Their Children (If They Have Any) Using VBA? Icon
I am using Excel (2007) VBA and I want to retrieve data from an Access (2007) database. My Excel VBA skills are intermediate but my Access VBA skills are novice.

This database has one parent table (PARENT) and one related child table (CHILD). The parent record may have no child records or anywhere from 1 to 5 child records. Each parent and childrecord has 3 fields, respectively.

When I click a command button (Form Control, not ActiveX) on the worksheet, I want to retrieve all of the fields for one particular parent record (it would be specified in the WHEREcriteria of the SQL statement) and any associated child records, if applicable, and save all of these values to a range of cells in my worksheet.

The desired outcome on the worksheet would look like:

Cell Value
A1 Parent record, field 1
...

Explanatory Notes:
1. If a parent record had no child records, it would simply leave cells A4:A18 empty.
2. If a parent record had 1 child record, it would leave cells A7:A18 empty.
etc.

QUESTION: How would I accomplish this in VBA using an ADO connection and what would the SQL statement look like?
 

Recursive Report!

Recursive Report! Icon
Just a bit ago I figured out how to "tier" Records in a Table so that the Table knows that certain Records are "children" of another Record. Basically, you just reference the ID of the immediate parent Record in the same table.

RecordID|ParentID|Description
1|0|Parent Record
2|1|Child Record 1
...

Basically, I want to "tab in" child records, like so:

* Parent Record
* Child Record 1
* Sub-child Record 1.1
* Sub-child Record 1.2
...
* Child Record 1
* Sub-child Record 1.1
* Sub-child Record 1.2
...