[Solved] Runtime error after change to split database

Discuss the database features
Post Reply
CarltonM
Posts: 4
Joined: Sun Mar 26, 2017 5:57 pm

[Solved] Runtime error after change to split database

Post by CarltonM »

Recently converted my database to a spit database as per viewtopic.php?f=83&t=65980
However; I now get a run time errors which did not occur before.
The database relies on forms and underlying code for data entry.
The error to show up is on the previously working function below;

Code: Select all

sub DebugText(strmessage as string)
'
' Display the supplied text in the Debug message text box.
'
'=====================================================
' Standard block to recover control object by name
'=====================================================
	Dim oDoc As Object	 	'Current document
	Dim oDocCtrl As Object	'current document control
	Dim oDBtextCtrl As Object' DebugText box control	
	Dim oForms As Object	'Forms object

	oDoc = ThisComponent	'Current document
	oDocCtrl=oDoc.GetCurrentController() 'Current document controller
	oForms = ThisComponent.DrawPage.Forms(0) ' Current Form
 	oDBtextCtrl =oForms.getbyName("DebugText")' Recover the DebugText control object
'=====================================================
	
	oDBtextCtrl.text = strmessage	'Set the DebugText control text equal to the message

end sub
This now gives the following run time error;
BASIC runtime error.
Property of method not fount: text.
at the line

Code: Select all

oDBtextCtrl.text = strmessage
Why might this have occurred?
Last edited by CarltonM on Fri Mar 31, 2017 12:06 am, edited 1 time in total.
Libre Office 5.1.6.2 on Linux Mint 18.1
Libre Office(x64) 5.3.1.2 and LO Portable V5.2.0.5 on Windows 7
User avatar
Villeroy
Volunteer
Posts: 31279
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: run time error after change to split database

Post by Villeroy »

Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
CarltonM
Posts: 4
Joined: Sun Mar 26, 2017 5:57 pm

Re: [SOLVED] Runtime error after change to split database

Post by CarltonM »

Thanks for the pointer towards MRI, a useful tool.
It confirmed the code was correct to start with. I thought this was the case as it was used successfully elsewhere n the code.

I ran the code on my W7 machine at work at it works correctly without any modifications. The same code is now running (unchanged) on
Mint 18.1

There was another error of some mis-matched brackets which some versions spotted and some didn't.
Libre Office 5.1.6.2 on Linux Mint 18.1
Libre Office(x64) 5.3.1.2 and LO Portable V5.2.0.5 on Windows 7
Post Reply