[Solved] Use Forms with access2base

Discussions about using 3rd party extension with OpenOffice.org
Post Reply
Ramon52
Posts: 5
Joined: Thu Sep 15, 2016 9:03 pm

[Solved] Use Forms with access2base

Post by Ramon52 »

I'm introducing to LibreOffice Basic and acces2base.
Libre Office 5.1.5, Windows 7
After opening a form (with OpenForm), how to pause the program for let the user enter data? What property or method should I use?
I'm stopped with this question and I don't find any clear explanations or examples. Can you help me, please?
Thank you
Last edited by Hagar Delest on Mon Sep 19, 2016 9:12 pm, edited 1 time in total.
Reason: tagged [Solved].
Apache OpenOffice 4.1.2, Windows 7
User avatar
Villeroy
Volunteer
Posts: 31279
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Use Forms with access2base

Post by Villeroy »

A form is an office document (text document in most cases) with a hierarchy of logical forms and subforms with form controls where you insert, edit or delete records until you close the form document.
Dialogs serve different purposes. You can not edit database records through dialogs.
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
Ramon52
Posts: 5
Joined: Thu Sep 15, 2016 9:03 pm

Re: Use Forms with access2base

Post by Ramon52 »

Thanks for the reply. My problem is that the following program is running in a single pull up at the end, without a pause to allow the user to enter data in the form. Any property or method is omitted?

Code: Select all

Sub StartMacroRemesa
	Dim ofRemesa as object, orsRemesa as object
	ofRemesa=OpenForm("Remesa",acNormal,,,acFormEdit,0)
	orsRemesa=ofRemesa.Recordset
	orsRemesa.Edit
	ofRemesa.SetFocus
	ofRemesa.Requery
'	StartMacro("export")
End Sub
Apache OpenOffice 4.1.2, Windows 7
JPL
Volunteer
Posts: 132
Joined: Fri Mar 30, 2012 3:14 pm

Re: Use Forms with access2base

Post by JPL »

Hi Ramon52,

there seems to exist a fundamental misunderstanding in how Basic procedures are triggered.
They are most of the time triggered by an EVENT, i.e. a click on a button, a jump to next record, a focus change, whatever ...

Additionally the procedure will not stop nor give the user the opportunity to react until the execution reaches the End Sub (or End Function) statement.

The OpenForm method will indeed open the desired form. If the user should then enter data, the statement containing OpenForm should be (one of) the last executable statements.

JPL
Kubuntu 22.04 / LibO 24.2
Access2Base (LibO).
BaseDocumenter extension (LibO)
ScriptForge (LibO)
Documentation on https://help.libreoffice.org/latest/en- ... bPAR=BASIC
Ramon52
Posts: 5
Joined: Thu Sep 15, 2016 9:03 pm

[Solved]Re: Use Forms with access2base

Post by Ramon52 »

Now I see it, is quite logical. Thank you very much.
Apache OpenOffice 4.1.2, Windows 7
Post Reply