General discussion

Locked

Access Forms/subform

By foxne273 ·
I have a master form with an address and subforms with an address that I would like to default to the address on the master form under certain circumstances. I cannot figure out how to pass the master form information to the subform. Is there a way to do that?

This conversation is currently closed to new comments.

1 total post (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

by sgt_shultz In reply to Access Forms/subform

do you have Help installed for your version of Access. it is excellent. here is a snippet from Access 2000 help 'subform'
(also see www.microsoft.com for access support including sample databases and code examples)
Microsoft Access automatically synchronizes the main form with the subform if one of the following conditions is met:

You have defined relationships for the tables you select, or you have defined relationships for the tables underlying the queries you select.
The main form is based on a table with a primary key and the subform is based on a table that contains a field with the same name as that primary key and with the same or a compatible data type and field size. For example, in a Microsoft Access database, if the primary key of the table underlying the main form is an AutoNumber field and its FieldSize property is set to Long Integer, the corresponding field in the table underlying the subform should be a Number field with its FieldSize property set to Long Integer. If you select a query or queries, the underlying tables for the query or queries must meet these conditions.
Nesting levels

A main form can have any number of subforms if you place each subform on the main form. You can also nest up to seven levels of subforms. This means you can have a subform within a main form, and you can have another subform within that subform, and so on. For example, you could have a main form that displays customers, a subform that displays orders, and another subform that displays order details. However, a form will not display subforms in PivotTable or PivotChart view.

Entering data using a form and subform

When you use a form with a subform to enter new records, Microsoft Access saves the current record in the main form when you enter data in the subform. This ensures that the records in the "many" table will have a record in the "one" table to relate to. It also automatically saves each record as you add it to the subform.

Back to Web Development Forum
1 total post (Page 1 of 1)  

Related Discussions

Related Forums