Form and Subform viewing data

  • Thread starter Thread starter Terry
  • Start date Start date
T

Terry

I am using a form and a subform to enter two different records into an
inventory database. When I scroll through the records on the form it skips
the records entered in the subform. Is there a way to program a form to view
all records, or to program the subform to view its records?

Thanks,
Terry
 
Hi, Terry.

It's difficult to identify your situation based on the information you've
given. Please post additional detail about the forms and their underlying
tables, including the relationship between the underlying tables or queries.

Generally speaking, a subform is placed on a main form to show the many side
of a one-to-many relationship. The main form on which it is placed shows the
one side, such as an Orders form with an OrderDetails subform. See the
Northwind Sample Database provided with Access (under the Help menu). The
relationship is established by the LinkMasterField and LinkChildField
properties of the subform control. In the absence of this relationship,
scrolling the records in the main form would have no effect on what is
displayed in the subform, which seems to be your situation.

Hope that helps.
Sprinks
 
I am using the form to move inventory transactions between locations. The
main form enters a location and the subform enters a location moved to. Both
transactions are located in a transaction table. When the form is used it
enters two transactions but when the user scrolls through the records only
one transaction is seen.

The main and subforms use a main table that holds the item numbers, a
location table to hold the different locations, and a transaction table to
track the inventory movement and levels.

A user enters an inventory number, quantity, and location for a from
transaction and the same for a move (subform transaction) both using the
same tables.

Does this description help?

Terry
 
Hi, Terry.

Although you didn't tell me explicitly, it sounds like there exists no
relationship between the main form and the subform. By that I mean that
there is no linking field entered in the LinkMasterField and LinkChildField
properties of the subform control.

As a "transaction" necessarily involves two parties, one transferring and
one receiving the same inventory item, I'm unclear on why a subform is
necessary. In any case, if you want the other side of transaction to
display, the main and subforms must share a common field.

If this does not resolve your issue, please post the important table
structures, define the relationships between tables, the RecordSource
properties of the main and subforms, and the LinkMasterField and
LinkChildField properties.

HTH
Sprinks
 
Back
Top