Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Synchronize records in two subforms 1

Status
Not open for further replies.

miche7

Programmer
Jan 14, 2003
12
0
0
US
Hello Techie - -

On one main form, I need to synchronize records in two subforms.

The main form is [SearchResultsFm] whose purpose is to display two subforms in datasheet view. As a result of the search, [SearchResultsFmSub1] contains selected tblCustomer records. [SearchResultsFmSub2] is supposed to show only the tblOrder records of the On Current Customer. I can get all the Order records of all the [Sub1] Customers or ALL the tblOrder records of ALL the tblCustomers. I haven’t been able to filter only the Order records of the On Current Customer in [Sub1]. The link between tblCustomer and tblOrder is CustKey.

Though I tried variations of this, the similar example in Northwind didn’t resolve this because it uses two windows. Both of the [SearchResultsFm] datasheet subforms need to be visible in one window that is maximized.

Any guidance is appreciated. Thank you.
 
Don't know if this will help, but can you setup a main form that is unbound & it'll have 2 subforms,[SearchResultsFmSub1] and [SearchResultsFmSub2]. On the unbound main form, put a text box (text1) & make the datasource = Sub1.custkey. In properties of Sub2, make link child fields = custkey & link master fields = text1. Don't click the "..." as you'll get an error. At this point, Sub2 shows the records that match the custkey from sub1.
 
Thank you dweis. This works. Only the records for the on-current customer in Sub1 show up in Sub2. After debugging this, I made the text field on the unbound main form visible=no.

Small matters that make such a big difference. Again, thanks. [smile]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top