Get TextBox Value in Libre BASE

Creating a macro - Writing a Script - Using the API (OpenOffice Basic, Python, BeanShell, JavaScript)
Post Reply
cplmckenzie
Posts: 2
Joined: Mon Jul 03, 2017 10:23 pm

Get TextBox Value in Libre BASE

Post by cplmckenzie »

Hello All,

I have a question or 3 about getting the string value of a textbox on a BASE form.

I have been searching this formum for a couple of weeks now for the answer.

I see many references to "This is how it is done....."

oForm = ThisComponent.DrawPage.Forms.GetByName("myFormName")
oControl = oForm.GetByName("myControlName") to reference the Control object
oForm.GetByName("myControlName").Text


But in all these references given... None shows the Additional calls and Dim's that need to be made.

So my question is....Can anyone point me to a complete Sub procedure that shows (step by step) how to get the value
of a textbox.string value.

Any help is greatly appreciated.

cplmckenzie
LibreOffice 5.3 on Linux Ubuntu
User avatar
Mr.Dandy
Posts: 427
Joined: Tue Dec 11, 2012 4:22 pm

Re: Get TextBox Value in Libre BASE

Post by Mr.Dandy »

It depends on what is your form.
So, provide a sample ODB.
OpenOffice 4.1.12 - Windows 10
cplmckenzie
Posts: 2
Joined: Mon Jul 03, 2017 10:23 pm

Re: Get TextBox Value in Libre BASE

Post by cplmckenzie »

Well, I have a form in BASE named "StartUp". On that form is textbox named "tbSwarmNum" with a value in it. I would like to get that value and assign it to a variable that can be used in an SQL query to access a table for record retrieval.

As soon as I figure how to up load I will upload a copy of my attempts.

Thanks

cplmckenzie
LibreOffice 5.3 on Linux Ubuntu
User avatar
robleyd
Moderator
Posts: 5056
Joined: Mon Aug 19, 2013 3:47 am
Location: Murbko, Australia

Re: Get TextBox Value in Libre BASE

Post by robleyd »

[Forum] How to attach a document here Note maximum file size is 128K. If your file is larger, use a file sharing site such as Mediafire.
Cheers
David
OS - Slackware 15 64 bit
Apache OpenOffice 4.1.15
LibreOffice 24.2.1.2; SlackBuild for 24.2.1 by Eric Hameleers
Post Reply