Ask Your Question
0

can we navigate through Control Table cell linked to other related form

asked 2018-10-16 08:05:09 +0200

koolninja gravatar image

can we navigate through Control Table cell to other related form

any suggestion

edit retag flag offensive close merge delete

Comments

Involves some macro coding which will depend on your setup. Basically an event for the cell first grabs text value of cell you're in, then moves the focus to the table you want, and finally possibly moves the current record in that table to a particular record based on the text. I also have a need to do something like this, but it will happen only when I find the time to mess with it. Hope that helps a little.

EasyTrieve gravatar imageEasyTrieve ( 2018-10-17 09:05:46 +0200 )edit

1 Answer

Sort by » oldest newest most voted
0

answered 2018-11-26 23:16:28 +0200

Ratslinger gravatar image

Hello,

The question can only be answered in general terms as each case would be specific to your data and forms.

This is done through macros. For selecting data from a grid you could do something as follows:

Sub GetGrid(oEvent)
    Dim oForm As Object
    Dim oColumn As Object
    Dim sValue as String
    Dim sFilter as String
    Dim sColumnName as String
    Dim iColumn as Integer
    If oEvent.Buttons = 1 and oEvent.Modifiers = 2 Then
        oForm = ThisComponent.Drawpage.Forms.getByName("YOUR_FORM_NAME")
        iColumn = oEvent.Source.CurrentColumnPosition
        oColumn = oForm.Columns.getByIndex(iColumn)
     REM  Data is available in oColumn.String
    End If
End Sub

The above looks for the Ctrl key to be pressed with a left mouse click. This is attached to the Mouse button released event of the grid.

Once you have the desired information you can open the appropriate form and use the data in a filter to display the record(s). A sample of doing the (sample uses ID to display the record) can be found here -> Base Macro - Click on Table Row to Open Record

As stated, the macros are just a generalization. They must be modified to fit your specific needs.

edit flag offensive delete link more

Comments

Added note, oColumn.Name is the name of the table column for the field selected. You can also access other pertinent data from other columns to obtain the required related data you are looking for.

Ratslinger gravatar imageRatslinger ( 2018-11-27 03:09:51 +0200 )edit
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2018-10-16 08:05:09 +0200

Seen: 37 times

Last updated: Nov 26 '18