subform problem again

dvh

Registered User.
Local time
Today, 09:00
Joined
Aug 23, 2006
Messages
28
i have a mainform containing 2 subforms. 1st subform will display a list of records for a search on the mainform.2nd will display a list of records for a selected record on the 1st subform. The problem is that 2nd subform will show only records corresponding to the 1st record on the 1st subform. I have check the ChildLink(Partlist) and MasterLink([submain].Form![Partlist]) carefully-it should work cos it could show the records for the 1st item.
Could anyone please tell why it didnt show records for other items on 1st subform?

p/s when i put 2nd subform on the 1st, it works with the Child and Master link. i dont want it cos its very messy...
 
Both subforms have to be on the Main form in order for the links to work correctly. If the 2nd subform is on the 1st subform, then the parent is actually the 1st subform and the child is the 2nd subform.
 
sorry i didnt make it clear...when i put the 2nd subform on the 1st. It worked properly. It however displays messy records thats why i put both subforms on the mainform and thats where the problem arises. Have no idea why it cant work when both on the mainform...If my link syntax is wrong then it should not show the 1st records right?
Help pls!
 
anyone could help pls? appreciate!!!
 
If the second subform is supposed to show records relating to the selected row in the first subform, the master/child links of the second subform need to reflect this. Use the following format for the master/link. You'll need to type it in.

firstsubformname!fieldname

Then in the Current event of the first subform, requery the second subform:

Forms!mainformname!secondsubformname.Requery
 
oh man!! you are great! thanks a lot...it worked!!!dont know y i tried other ways but couldnt work...thanks alot:D
 

Users who are viewing this thread

Back
Top Bottom