From: sam on 9 Apr 2010 12:23 Hi All, How can I reload a subform to display new results? I have developed a search form in headersection and inserted a subform in the details section that displays the results. The problem here is that, the data is refreshed BUT I have a dynamic SQL statement for columns, where columns are search criterias. So basically I only want to display columns in the subform that the users have selected as their criteria. Thanks in advance
From: Marshall Barton on 9 Apr 2010 14:42 sam wrote: >How can I reload a subform to display new results? I have developed a search >form in headersection and inserted a subform in the details section that >displays the results. The problem here is that, the data is refreshed BUT I >have a dynamic SQL statement for columns, where columns are search criterias. >So basically I only want to display columns in the subform that the users >have selected as their criteria. > If you change the list of fields in the subform's record source Select clause, then you need to change the subform control's ControlSource property accordingly: With Me.subformcontrol.Form .ReeordSource = "SELECT f1, f2, f3 ..." .text1.ControlSource = "f1" .text2.ControlSource = "f2" .text3.ControlSource = "f3" End With -- Marsh MVP [MS Access]
|
Pages: 1 Prev: Combo Box AfterUpdate Problem - Access 2007 Next: IF ElseIf and Else |