got_access:]
Registered User.
- Local time
- Yesterday, 22:22
- Joined
- Jun 15, 2018
- Messages
- 83
Hi,
I know there are different ways to make a combination MAIN/SUB form for a one-to-many relationship.
One way is to create the subform perhaps in datasheet or tabular mode and then use the sub-form control to import it into the main form. With this method one ends up with the sub-form as a unique object which is then visible in the navigation pane. And because of that - I personally don't consider this the best approach.
Another way is to create the main form and use a LIST box control - where the record source for that list is an SQL statement. And as one would do with the sub-form, locate this list form nested inside the main form. This method does not create the sub-form as a unique object visible in the navigation pane. But it has the disadvantage of requiring the developer fuss over its appearance - especially if one prefers Access' standard datasheet view.
A third - and perhaps the simplest way - is to allow the Access wizard to create the Main & Sub Form from two tables having a one-to-many relationship.
Highlight the "parent" table in the navigation pain, and then simply click Create\Form.
Access will create both forms and nest the sub-form inside the main form.
My question is about the subform that is created in this last method. This sub-form's parameters are automatically set to display it in the standard Datasheet view with headers. The wizard gives it a default name of "Child##". And the wizard does not create it as a unique object visible in the navigation pane.
It would almost seem that this method would be the most popular. As you don't end up with the subform as a unique object in the navigation pane. And yet the wizard creates it to appear as much in datasheet view as if it were a unique form object.
Can anyone point me to information about these various subforms and what the difference is between them? Is there a general preference that most developers have for how they create these? It would seem to me that not having a subform appear as a unique object in the navigation pane would be generally preferred. And having the sub-form look/feel be that of Access' standard datasheet view would also be preferred. But that's just me.
Sincere thanks in advance!
I know there are different ways to make a combination MAIN/SUB form for a one-to-many relationship.
One way is to create the subform perhaps in datasheet or tabular mode and then use the sub-form control to import it into the main form. With this method one ends up with the sub-form as a unique object which is then visible in the navigation pane. And because of that - I personally don't consider this the best approach.
Another way is to create the main form and use a LIST box control - where the record source for that list is an SQL statement. And as one would do with the sub-form, locate this list form nested inside the main form. This method does not create the sub-form as a unique object visible in the navigation pane. But it has the disadvantage of requiring the developer fuss over its appearance - especially if one prefers Access' standard datasheet view.
A third - and perhaps the simplest way - is to allow the Access wizard to create the Main & Sub Form from two tables having a one-to-many relationship.
Highlight the "parent" table in the navigation pain, and then simply click Create\Form.
Access will create both forms and nest the sub-form inside the main form.
My question is about the subform that is created in this last method. This sub-form's parameters are automatically set to display it in the standard Datasheet view with headers. The wizard gives it a default name of "Child##". And the wizard does not create it as a unique object visible in the navigation pane.
It would almost seem that this method would be the most popular. As you don't end up with the subform as a unique object in the navigation pane. And yet the wizard creates it to appear as much in datasheet view as if it were a unique form object.
Can anyone point me to information about these various subforms and what the difference is between them? Is there a general preference that most developers have for how they create these? It would seem to me that not having a subform appear as a unique object in the navigation pane would be generally preferred. And having the sub-form look/feel be that of Access' standard datasheet view would also be preferred. But that's just me.
Sincere thanks in advance!