[Solved] Property 'Only Data Entry' in form

Discuss the database features
Post Reply
User avatar
JoseJuan
Posts: 16
Joined: Sun Apr 29, 2018 10:16 am

[Solved] Property 'Only Data Entry' in form

Post by JoseJuan »

Hi,

I want to use the same form to edit and add new records, from diferent buttons.
I need to change the 'Only Data Entry' property of the form depending on the button that calls it.

There is a drop down for this form property in design mode, data tab, I just need to assign the value of this property when loading the form.

I have managed to position the form when opening in a new record using moveToInsertRow, but I do not want to keep access to other records from the navigation bar. Disable some buttons of this bar would serve to me.

Greetings.
Last edited by JoseJuan on Mon Apr 30, 2018 6:29 pm, edited 1 time in total.
LibreOffice 6.1 on Windows 7 / LibreOffice 5.4 on Windows XP
User avatar
Villeroy
Volunteer
Posts: 31279
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Property 'Only Data Entry' in form

Post by Villeroy »

Use a better database frontend. Base is too simple (and therefore difficult to use) for developers who want full control over the GUI elements.
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
User avatar
JoseJuan
Posts: 16
Joined: Sun Apr 29, 2018 10:16 am

Re: Property 'Only Data Entry' in form

Post by JoseJuan »

Thanks for the advice. The licensing policy of my company does not allow me to use another development tool.
I have been using ms-acc for many years and I did not think that something so simple, such as choosing the data mode when opening a form or changing that property when opening it, would be so complicated in BASE.
LibreOffice 6.1 on Windows 7 / LibreOffice 5.4 on Windows XP
UnklDonald418
Volunteer
Posts: 1547
Joined: Wed Jun 24, 2015 12:56 am
Location: Colorado, USA

Re: Property 'Only Data Entry' in form

Post by UnklDonald418 »

Maybe something here would help
Macro to open form with add data only behaviour
If your problem has been solved, please edit this topic's initial post and add "[Solved]" to the beginning of the subject line
Apache OpenOffice 4.1.14 & LibreOffice 7.6.2.1 (x86_64) - Windows 10 Professional- Windows 11
User avatar
Villeroy
Volunteer
Posts: 31279
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Property 'Only Data Entry' in form

Post by Villeroy »

The whole Base component, including all the drivers weighs 30MB. The forms are attached to office documents. There is absolutely nothing which comes even close to MS Access.
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
UnklDonald418
Volunteer
Posts: 1547
Joined: Wed Jun 24, 2015 12:56 am
Location: Colorado, USA

Re: Property 'Only Data Entry' in form

Post by UnklDonald418 »

This seems to work on my form

Code: Select all

REM  *****  BASIC  *****

Sub ToggleAddDataOnly(oEv as object)
Dim oForm as object

oForm = oEv.Source.Model.Parent
If oForm.IgnoreResult = TRUE then
  oForm.setPropertyValue("IgnoreResult", FALSE)
else
  oForm.setPropertyValue("IgnoreResult", TRUE)
end if
oForm.reload
oForm.moveToInsertRow

End Sub
If your problem has been solved, please edit this topic's initial post and add "[Solved]" to the beginning of the subject line
Apache OpenOffice 4.1.14 & LibreOffice 7.6.2.1 (x86_64) - Windows 10 Professional- Windows 11
User avatar
JoseJuan
Posts: 16
Joined: Sun Apr 29, 2018 10:16 am

Re: Property 'Only Data Entry' in form

Post by JoseJuan »

Thanks very much. :bravo:
Now the mine also run fine, it's just what I was looking for.

Regards.
LibreOffice 6.1 on Windows 7 / LibreOffice 5.4 on Windows XP
Post Reply