Prevent Autosave of record from sub form to table

Creating and using forms
Locked
ps_jayadev
Posts: 12
Joined: Wed Aug 08, 2012 9:13 am

Prevent Autosave of record from sub form to table

Post by ps_jayadev »

hi everyone,

I have a form which has a main form and sub form. The main form is based on a query that is based on 3 tables. The subform is connected to only one table. It has 4 fields of which 3 are compulsary. Only new data can be added to the table through the sub form. I want the data to be saved to the table on the click of a push button.
My problem is when I enter data in one or 2 fields and try to come out of it, the form tries to save the data as a new record in the table. If 3 of the compulsory fields are filled, it automatically saves the data otherwise it throws an error telling that the data could not be saved. I do not want the data to be saved automatically until the push button is clicked.
I tried many things but I could not find a solution. Please help me on how to prevent to this autosave.

Thanks,
Jayadev.
Jayadev
OOo 3.4.0
Windows XP
User avatar
MikeytheMagnificent
Posts: 137
Joined: Fri Apr 11, 2008 12:06 am
Location: W. Yorks UK

Re: Prevent Autosave of record from sub form to table

Post by MikeytheMagnificent »

I too have never found a way to inhibit autosaving. It happens whenever you shift to another record or form after any data edit and imho makes Base totally unsafe, not to say rubbish. You can change every record without a single 'Save' prompt and provided you dont change the final record you visit will not even be asked to confirm before closing your form , even though you have just trashed your entire data, and for ever. There Aint no undo getout!!.

I dont know if this is an all formats problem. Its definitely a nightmare in Windoze

I made a bug report some months back with no reply, but it should have been sorted in 1.0 and now we're at 3.4.1.
I didnt see any other similar reports which worries me much.
Many opportunities to add short Tutorials or faq's are missed

1. Must have obvious title to be found easily
2. Keep to objectives
3. Use very clear language
4. Difficult to get right
5. Rewards are few
amiltonpueljr
Posts: 26
Joined: Mon Sep 03, 2012 1:53 am

Re: Prevent Autosave of record from sub form to table

Post by amiltonpueljr »

same here
Trying to learns base basics or not so basics
OpenOffice 3.5.6 on Windows 7 Home Premium
Nocton
Volunteer
Posts: 539
Joined: Fri Nov 05, 2010 10:27 am
Location: UK

Re: Prevent Autosave of record from sub form to table

Post by Nocton »

Why don't you link your sub-form to a 'working' table. Then link your Save button to code that updates the actual table from the working table and deletes the records in the working table?

Regards, Nocton
OpenOffice 4.1.16 on Windows 10 & 11
User avatar
Villeroy
Volunteer
Posts: 31365
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Prevent Autosave of record from sub form to table

Post by Villeroy »

Create a single-record form (no table grid) and set property "Cycle"="Active Record".
Hide the navigation toolbar ("Navigation bar"="No").
Add a single push button which saves the record and jumps to a new one ("Action"="New record") and another one to cancel undo the edits on the current record ("Action"="Undo data entry").
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
Locked