Tabbed Forms - make page 2 filter by record on page 1

obiron

New member
Local time
Today, 22:39
Joined
Jun 30, 2008
Messages
6
Hi guys, I'm just trying to get to grips with tabbed forms. I am trying to create a simple way for users to review related records.

Lets say I have a tables for customers, orders and deliveries with 1:many relationships of C:O and O:D

I want to create a tabbed form that allows the user to scroll through the customers, then move to page 2 and scroll through the orders for the customer selected on page 1, then move to page 3 and scroll through the deliveries for the selected order.

I add fields on page 1 bound to table tblCustomers. I add fields to page to bound to tblOrders and Access asks for the relationship between records on page 1 and page 2 (answer = 1 record on page 1 = many records on page 2, joined field is CustomerID). When I do this, the default record shown on page 2 does indeed belong to the customer selected on page 1, but when I scroll, the records are not filtered to only those orders for the selected customer.

I cannot see in the properties how to do this.

FYI I am using Access 2007 for development, but would like to deploy the application as 2003 so don't want to use any 2007 only tricks.

Thanks in advance

Obiron
 
Apparently your fields aren't joined in the form/subform. In Design View for the form, select the Subform Control (not the form being used as a subform) and goto

Properties - Data

and set CustomerID in the Link Master Fields Property and the same thing (or whatever you call it in the child table/form) in the Link Child Fields Property. You should now be set.
 
I have not set the report on page 2 as a sub-form of the report on page 1.

When I choose a record source for page 2, Access asks me for the relationship to the data on page 1, which I have supplied. when you select a record on page 1 then then move to page 2, the first record shown is the first record related to that of page 1, but the scroll buttons will show ALL records in the second data set, NOT just those related to the record selected in page 1.

Is the answer that I have to set up page 2 as a subform of page 1?
 

Users who are viewing this thread

Back
Top Bottom