Let’s say that the execution of this procedure below displays the expected result, namely the record according to the sRecordID variable, so if the ID is 299, the record 299 is displayed. That’s correct.
I have in this form, a control table [named Selection] which acts as a select list, so normally all the records in the form appear as a list. It is then easy to select a name and access this recording. The table list still remains intact and complete.
However, when I run this procedure, the control table only shows the record name of the sRecordID as a result. Which is correct, but I lose access to the full list of the control table. If I request a refresh of the form, the first record in the form will show up with the list full list from the select table.
Is it possible that the sRecordID record (this one manipulated by the procedure) is displayed as expected, but with the complete list of the selection table. ? The execution of this procedure was done from a button at the sRecordID record with complete list of the control table which was displayed.
How can I solve this problem, if it is possible to solve it?
Sub SetLink(oEvt, sFormName, sButtonName)
. . .
' There is a lot of code in this procedure.
' The lines below partially represent the end of the procedure.
. . .
If sFormName = "frm-X" Then
. . . ' Some code lines
ElseIf sFormName = "frm-FilmsSeries" Then
oDoc = ThisDatabaseDocument.FormDocuments.getbyname("FilmsSeries")
oObj2 = oDoc.getComponent().getDrawPage().getForms().getByName("frm-FilmsSeries")
sSelect = "( FilmSerieID = " & sRecordID & " )"
End If
Wait 100
oCurrentController = oDoc.getComponent().getCurrentController()
oContainer = oCurrentController.getFrame().getContainerWindow()
oObj2.Filter = sSelect ' Filter: The field of the table linked to the main form = the ID of the current record
oObj2.Reload() ' Reload the form to get the specified record.
oObj2.Filter = ""
End Sub