I am trying to write a macro to open a query while in a form.
I tried this and got the message,BASIC runtime error.An exception occurred
Type: com.sun.star.container.NoSuchElementException
Debian10 LO 5.2.2.2
Could someone please help w/this.
Thank You, Pumper
SUB QueryChange( sQueryName )
Dim ObjTypeWhat
Dim ObjName As String
Dim sName as String
Dim sTitle As String
Dim iStart As Integer
ObjName = sAVAILABLE1
ObjTypeWhat = com.sun.star.sdb.application.DatabaseObject.QUERY
ThisDataBaseDocument.CurrentController.Connect() 'If the query exists connect to the database'
ThisDatabaseDocument.CurrentController.loadComponent(ObjTypeWhat, ObjName, FALSE) 'Open the query'
End Sub