acces2base L.O vs O.O - Gridcontrol - Column Position

L.O. 5.1.3.2 acces2base. mysql


I created a form, grid, based on a stored query which contains all members of our club.


A button will open a form with member details based on the record ID of the member in the grid.


This ID is the first column in the grid, and therefor has position 0.


It works fine in L.O. but when I use Open Office (on another laptop) I have to change the script. The value of ID has to be set to 5??


I discovered that in L.O. this ID column has to stay the first one if I want to use “0”


In O.O. changing the position of the column doesn’t change anything.
I checked if this has to do with the position in the query on which the form is build but I can’t find anything.

How can I make this work in both L.O. & O.O.? As I will have more of this in my application & I want to distribute it to different people in the club, I do not want to edit all the time the macro’s depending what it is used, L.O. or O.O.

This is the macro:

Function OpenFormLid


Dim ocGrid As Object


Dim ID as Integer ’ ID van lid


Dim ssql as string


Dim sf as string


Dim ofForm As Object

Set ofForm = Forms(“f_leden”)

Set ocGrid = ofForm.Controls(“MainForm_Grid”)

 ID = ocGrid.Controls(0).Value

sf=“f_lid”

ssql = " t_leden.leden_id = " & ID

DoCmd.OpenForm (sf, ,ssql , , )

End Function

I close this item as there is a workaround.

https://forum.openoffice.org/en/forum/viewtopic.php?f=13&t=83593