Saving column widths

Creating tables and queries
Post Reply
Rchall
Posts: 5
Joined: Wed Oct 25, 2017 7:52 pm

Saving column widths

Post by Rchall »

I have a database containing 3 tables. I set the columns widths in one table, save it and move on to another table and do the same there. I very often find that when I go back to the first table the columns have reverted to default width. If I keep all the tables open at the same time (which I often do) it is not a problem - when I have finished I close down the database and save it when it asks. When I open the base again I find that at least one of the tables has the column widths reset to the default value.
Is there a way of setting custom column widths in each table and making them stay like that?
I also find the same problem with the date column - I want it to remain formatted as "1999-12-31" but often come back to the database and it has reverted to "31/12/99".

I save the database each time I close it so I can't understand why this formatting doesn't always save.

I can cope - it's just annoying to have to reset them when I open it. Any help gratefully received.

Rob
Openoffice 4.13 on Windows 10 build 15063
User avatar
RoryOF
Moderator
Posts: 34586
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Saving column widths

Post by RoryOF »

In what format are you saving?
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
Rchall
Posts: 5
Joined: Wed Oct 25, 2017 7:52 pm

Re: Saving column widths

Post by Rchall »

The database format is .odb.
When I shut it down the dialogue box says

"The database "Recordings" has been modified. Do you want to save your changes".

I just press "save".

Is that what you mean?

Thanks, Rob
Openoffice 4.13 on Windows 10 build 15063
User avatar
RoryOF
Moderator
Posts: 34586
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Saving column widths

Post by RoryOF »

Yes - the native OpenOffice formats are best for reliable working. Had you not been working in .odb I would have suggested that as a first step.
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
UnklDonald418
Volunteer
Posts: 1544
Joined: Wed Jun 24, 2015 12:56 am
Location: Colorado, USA

Re: Saving column widths

Post by UnklDonald418 »

The Tables GUI in Base has few formatting options. It would be better to create a table control on a form because it has more savable formatting options.
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
Rchall
Posts: 5
Joined: Wed Oct 25, 2017 7:52 pm

Re: Saving column widths

Post by Rchall »

Thanks for the answer UnklDonald418. I think I can figure out how to create a form. If I insert the tables into a form can I edit them there? One of the tables currently has 26649 fields and I am adding to it regularly - I don't want to have to start filling it in again.

Further to that - I created a form with one of the tables and under format the columns option was greyed out. I adjusted the columns manually but they reverted to default as soon as I closed and opened the form (even after clicking save). I notice that everything in the format tab is greyed out.

Rob
Openoffice 4.13 on Windows 10 build 15063
UnklDonald418
Volunteer
Posts: 1544
Joined: Wed Jun 24, 2015 12:56 am
Location: Colorado, USA

Re: Saving column widths

Post by UnklDonald418 »

A Table control on a Base form can Edit/Add records the same as the Tables GUI. The rows/records in a table are indexed on a 32 bit integer so you might not live long enough to type in that many rows. Realistically, the limit on the number of rows would likely be the amount of memory installed in your computer.
In the main Base window Right click on the form name and select Edit to open the form in the Edit/Design mode.
Click anywhere on the table and a set of green handles will surround the table. You can use those handles to resize the table.
If you click on one of the column headings you can drag it into a different position.
Right click on one of the column headings and select Control to open the Properties dialog for that column. The General tab of the Properties dialog has all the formatting options. Once the dialog is open you can select any other table heading to see the Properties dialog for that column. Depending on the data type for that column you have a number of formatting options.
For instance select a column containing dates and look for the Date format property. Click on the down arrow to the right and you can choose from about a dozen different date formats.
If you click on the body of the table the dialog will change to Properties: Table Control where you can use the Font property choose a different font or font size.
When you are done adjusting the properties type <Ctrl>S or select File->Save to save your changes.
Near the top of the window along the left margin is an icon for Design Mode On/Off. Click on that icon to change to the live mode where you can edit your data.
Occasionally when scrolling in a table, it will lose track of which record to display and the table will be filled with a single repeated row. Click on Last Record on the navigation bar to synchronize the table.

When using an Embedded database be sure to backup after each session entering data. Occasionally, Open Office crashes and if your database is open there is the possibility of your tables disappearing. The problem is that an .obd file is actually a zip archive and the table data is also zipped into that archive. If something goes awry the zip archive can be corrupted beyond repair.
Since you have so many rows/records already entered into your database you should consider converting to a split database so that the tables aren't part of the zip process.
There are a multiple approaches to do this outlined in the Base Tutorials area of this Forum.
The one that has worked for me is:
viewtopic.php?f=83&t=61183
Once you've created a split database you can copy the Tables, Queries, Forms and Reports using Cut and Paste, or by dragging them one by one from the Embedded database into the Split database.
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
Post Reply