hi all,
got a tricky problem...hope to get help from u all...appreciate!!!
i almost complete this but run into a "refresh" problem..I have a mainform with a textfield where users can input a number to search for an item; if found, a list in the 1st subform will appear in datasheet view. When i select a item in the 1st subform, if the item has a child, the 2nd subform will show the item's child/children.
I try to do this by passing a parameter from a MasterPno-Link field(linked to Partlist field in the 1st subform) on the mainform to a query that the 2nd subform is based on. The problem now is when i select a record on 1st subform, the 2nd subform doesnt refresh to show the corresponding number although it always shows the first item corresponding with the 1st item in the 1stsubform.
I tried to use this code on AfterUpdate event of MasterPno_Link. No error but no update..
Private Sub MasterPno_Link_Change()
Dim ctlList As Control
' Return Control object pointing to list box.
Set ctlList = Forms!submain1
' Requery source of data for list box.
ctlList.Requery
End Sub
I also tried this Form!submain1.Requery but didnt work
what am i doing wrong? pls enlighten me! thanks alot. Hope i make myself clear
got a tricky problem...hope to get help from u all...appreciate!!!
i almost complete this but run into a "refresh" problem..I have a mainform with a textfield where users can input a number to search for an item; if found, a list in the 1st subform will appear in datasheet view. When i select a item in the 1st subform, if the item has a child, the 2nd subform will show the item's child/children.
I try to do this by passing a parameter from a MasterPno-Link field(linked to Partlist field in the 1st subform) on the mainform to a query that the 2nd subform is based on. The problem now is when i select a record on 1st subform, the 2nd subform doesnt refresh to show the corresponding number although it always shows the first item corresponding with the 1st item in the 1stsubform.
I tried to use this code on AfterUpdate event of MasterPno_Link. No error but no update..
Private Sub MasterPno_Link_Change()
Dim ctlList As Control
' Return Control object pointing to list box.
Set ctlList = Forms!submain1
' Requery source of data for list box.
ctlList.Requery
End Sub
I also tried this Form!submain1.Requery but didnt work
what am i doing wrong? pls enlighten me! thanks alot. Hope i make myself clear

Last edited: