Always open new/last record

Discuss the database features
Post Reply
cpatel
Posts: 1
Joined: Tue Jul 12, 2011 4:01 pm

Always open new/last record

Post by cpatel »

Hi,

I am new to using Base and I have just created a form on base. When I open to form to enter new record, it always defaults to openning a the first record. I want it to always open a new record or at the very least open the last record. How can I get it to do this.

Please note I do not know how to do any coding, I don't even know how to view the code. I created visually (not by coding it).

please help, thanks.
OpenOffice version 3.3.0
Operating System: Windows 7
User avatar
Villeroy
Volunteer
Posts: 31279
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Always open new/last record

Post by Villeroy »

Open the form document for editing and get the form properties.
The form has a property "New Records Only".

Example: http://user.services.openoffice.org/en/ ... hp?id=3048
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
r4zoli
Volunteer
Posts: 2882
Joined: Mon Nov 19, 2007 8:23 pm
Location: Budapest, Hungary

Re: Always open new/last record

Post by r4zoli »

This can be solved by changing your form to add data only. This state no older records shows, you can entry only new data.

Open form in edit mode, on form design toolbar click on Form navigator icon, select MainForm, right click on it select properties.
On data tab change "Add data only" property to "Yes", save changes, close form.
Reopen form, and now you not see already added data.
I suggest to create separate form for entering data, and another with normal settings.
AOO 4.0 and LibO 4 on Win 8
Hungarian forum co-admin
mnPines
Posts: 1
Joined: Wed Nov 08, 2017 11:25 pm

Re: Always open new/last record

Post by mnPines »

Here is what I did.
1> EDIT Form
2> The FORM button on the bottom. Brings up the Form Properties.
3> Data tab,
4> Sort by KEY Field, Order Descending
5> Close, save, test.

It is a bit ugly but it will open to the 'Last Record' and will not re-order your table or lock you into 'Add data only...'
LibreOffice 4.2 on Lubuntu 14
User avatar
Villeroy
Volunteer
Posts: 31279
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Always open new/last record

Post by Villeroy »

Enforced sort order:
Source type: SQL
Source: SELECT * FROM "Table" ORDER BY "Field" DESC
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
Post Reply